in reply to Re: pattern matching and return values
in thread pattern matching and return values
lame but fun; don't follow this idiom|t.
use Data::Dumper; my $stuff = 'ASDFZXCV S;JL KJQWER QWER ZXCVO ;QLKWERQ JKL;JAPS'; my %hash; my @keys = qw( asdf qwer jkl; ); @hash{@keys} = $stuff =~ / (asdf) .*? (qwer) .*? (jkl;) /gix; print Dumper \%hash;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: pattern matching and return values
by tachyon (Chancellor) on Jul 18, 2004 at 09:31 UTC |