You can add the name onto the existing $acct variable
pojwhile (<$fh>){ next unless /\S/; # skip blank lines if (/Acct:(\d+)/){ $acct = $1; if (/Name:([^\s]+)/){ $acct = $1.'_'.$acct; } } push @{$data{$acct}},$_ if ($acct); }
In reply to Re^8: How do I use grep in a script
by poj
in thread How do I use grep in a script
by Flintlock
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |