You can do
if you want the conditional expression shorter and don't want to repeat the dollar-digit vars.if (my @r = $line =~ /(this).*(that).*(some).*(other)/) { my ($this, $that, $some, $other) = @r; do_it(); }
ihb
See perltoc if you don't know which perldoc to read!
In reply to Re^4: Perl oddities
by ihb
in thread Perl oddities
by brian_d_foy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |