There's more than one way to do things | |
PerlMonks |
Re^9: writing two files (different in length) to one outputby hippo (Bishop) |
on May 31, 2017 at 07:29 UTC ( [id://1191675]=note: print w/replies, xml ) | Need Help?? |
while ( (print "Prompt: "), $line=<STDIN>, $line !~ /^\s*Q(uit)\s*$/i ) Having spent 5 minutes looking at this one line I'm still stumped as to the purpose of the capture group in the regex. Can you explain the purpose? ie. why would /^\s*Quit\s*$/i not perform exactly the same in your given code (since you have not subsequently referred to the captured data)? Thanks.
In Section
Seekers of Perl Wisdom
|
|