You are not checking if your match is successfull. Only a successfull match sets $1 (and the other variables).
foreach my $try (@array2) { $try =~ /^(.*),"(.*)",(.*),(.*),"(.*)"/s or die "Malformed input data: >>$try<<"; ... };
Also consider putting the code you post into <code>...</code> tags, so it can be downloaded and it renders nicely.
In reply to Re: Hash problem
by Corion
in thread Hash problem
by Gnat53
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |