10-02-2012
both awk and perl are going to take the ( ) as grouping brackets, not literal ones, unless you escape them.
5 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I wish to execute a simple perl script to pass unix commands on a HPUX platform, retrieve the result and filter through the text to determine outcomes x,y and z. I am developing the code on my windows system.
I initially wrote the code to issue UNIX commands line by line, however i soon... (1 Reply)
Discussion started by: mmetcalfe
1 Replies
2. Programming
I know that <cstudio> can also be <stdio> and can be written different ways on Linux then with windows.
I've see some code doing a IFDEF __APPLE__ (I'm guessing, if compiled on a mac do whats between this) Is there one for Linux/Window? (3 Replies)
Discussion started by: james2432
3 Replies
3. UNIX for Advanced & Expert Users
We have a mix of AIX, HP-UX, Linux (RHEL and SLES), and Solaris in our environment. Currently we have seperate patch management systems for each platform (NIM, SD, Spacewalk, etc), but have started looking for a centralized patch management solution that would work for most, if not all, of our... (0 Replies)
Discussion started by: kknigga
0 Replies
4. Shell Programming and Scripting
Dear Unix Forums,
I am hoping you can help me with a pattern matching problem.
What am I trying to do?
I want to replace multiple lines of a text file (that match a multi-line pattern) with a single line of text. These patterns can span several lines and do not always have the same number of... (10 Replies)
Discussion started by: thefang
10 Replies
5. Solaris
Hi,
I have a multiprocess C application (used POSIX library for threads and fork() & exec for creating process) of millions of LOC.
1. Which works fine in single processor machine.
2. Which works fine in multicore machine only if one core is enabled.
Problem is, which results an undefined... (2 Replies)
Discussion started by: sreejesh
2 Replies
LEARN ABOUT MOJAVE
english5.18
English(3pm) Perl Programmers Reference Guide English(3pm)
NAME
English - use nice English (or awk) names for ugly punctuation variables
SYNOPSIS
use English;
use English qw( -no_match_vars ) ; # Avoids regex performance penalty
# in perl 5.16 and earlier
...
if ($ERRNO =~ /denied/) { ... }
DESCRIPTION
This module provides aliases for the built-in variables whose names no one seems to like to read. Variables with side-effects which get
triggered just by accessing them (like $0) will still be affected.
For those variables that have an awk version, both long and short English alternatives are provided. For example, the $/ variable can be
referred to either $RS or $INPUT_RECORD_SEPARATOR if you are using the English module.
See perlvar for a complete list of these.
PERFORMANCE
NOTE: This was fixed in perl 5.20. Mentioning these three variables no longer makes a speed difference. This section still applies if
your code is to run on perl 5.18 or earlier.
This module can provoke sizeable inefficiencies for regular expressions, due to unfortunate implementation details. If performance matters
in your application and you don't need $PREMATCH, $MATCH, or $POSTMATCH, try doing
use English qw( -no_match_vars ) ;
. It is especially important to do this in modules to avoid penalizing all applications which use them.
perl v5.18.2 2014-01-06 English(3pm)