good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
RE: regexp'sby Anonymous Monk |
on Oct 03, 2000 at 21:49 UTC ( [id://35153]=note: print w/replies, xml ) | Need Help?? |
# you might have to refine the regexp, but that should
# match your array
foreach $element (@array)
{ if ($element=~/(\d+).*\s+(\w+)/)
{
$hash{$2}=$1;
}
}
# probably not the best, but it should work!
In Section
Seekers of Perl Wisdom
|
|