in reply to Re: export variable outside foreach
in thread export variable outside foreach
@lines being empty seems unlikely, since it was grepped out of the file. @fields may not contain four fields though (Edit: whoops, @lines, can be empty, is just can't contain empty strings unless $string1 is empty)
mitchreward, have a look at Data::Dumper. If you use Data::Dumper; and then add print Dumper \@fields; to your loop you may have more information on what is happening.
Edit: the code you provided does compile, so you have removed the error by changing it.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: export variable outside foreach
by AnomalousMonk (Archbishop) on Jun 19, 2014 at 09:10 UTC | |
by Eily (Monsignor) on Jun 19, 2014 at 09:18 UTC |
In Section
Seekers of Perl Wisdom