in reply to Matching against $_ behaves differently than matching against a named scalar?
Also, it is possible to 'control flow', being inside regex:/^([^ ]+) ([^ ]+)/ or /(*ACCEPT)/; # or /(?=)/; print "$1 $2" . "\n" if $1 && $2;
That way of using regex (with (?{ <code> }) construct) is useful for debugging./^([^ ]+) ([^ ]+)(?{ print "$1 $2" . "\n" })/;
|
|---|