Re: Learning perl, understanding the basics.

2013-01-01 Thread Zachary Bornheimer
The information given to you on this is sufficient to explain that the repetition operator (x) takes a string on the left and a number on the right (specifically a positive integer). As you can tell, perl does not make you say that a $foo is an integer or $foo is a string, but rather just allows y

Re: grouping in regex

2012-12-23 Thread Zachary Bornheimer
For this error, try something like this: Take note of any regex changes that you were advised in other emails if ( $line =~ /AccessModes\s*=\s*.*(WebMail)*.*(POP).*(WebMail)*.*/ ) { if (defined $2 && $2 && $1 ) { print $2 . " " . $1 . $line . "\n"; } } Make sure that $2 is initia