Maybe something like this (quick proposal, untested):
my %my_hash; while <DATA> { chomp; my $id = (split /:/, $_)[1] if /id/; if (/name/) { my $name =~ /: "(\d+)"/; $my_hash{$name} = $id; } }
In reply to Re: Help Extract these lines
by Laurent_R
in thread Help Extract these lines
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |