in reply to Hash problem
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hash problem
by Gnat53 (Novice) on Feb 04, 2006 at 01:21 UTC |