in reply to Modifying a regex

You can do it right here:
while (my $line = <IN>) { #next unless $line =~ m{^(\S+) (\d+) (.*)}; next unless $line =~ m{^(\S+) NA(\d+) (.*)}; # Now 'NA' is not captured. my ($site, $userID, $data, $data2) = ($1, $2, $3, $4); $user{$userID}{$site} = $data, $data2; }
Coupl'a notes:
$4 is never populated - you only have 3 sets of captureing paran's, so $data2 is empty and meaningless
This regex should've failed all together because 'NA1234' doesn't pass (\d+) in your regex.


grep
One dead unjugged rabbit fish later