in reply to I am geting an unhelpful error message. Not sure how to debug it.
foreach @line ($a) {
Lookup foreach in the documentation. If you use two variables with foreach, the first one must be a scalar, not an array.
By the way: Your code either lacks
or die "Can't open '$a': $!"after open or use autodie; after use strict;. And unless you have a very strangely named file on your filesystem, it will die. Lookup chomp.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: I am geting an unhelpful error message. Not sure how to debug it.
by Socrates440 (Acolyte) on Jun 15, 2012 at 04:41 UTC | |
by NetWallah (Canon) on Jun 15, 2012 at 05:30 UTC | |
by ww (Archbishop) on Jun 15, 2012 at 12:39 UTC |