http://www.perlmonks.org?node_id=435633


in reply to Re^3: Perl oddities
in thread Perl oddities

You can do

if (my @r = $line =~ /(this).*(that).*(some).*(other)/) { my ($this, $that, $some, $other) = @r; do_it(); }
if you want the conditional expression shorter and don't want to repeat the dollar-digit vars.

ihb

See perltoc if you don't know which perldoc to read!