in reply to foreach - adding newlines?
Ignoring your question for a second,
chomp;
should be
chomp($event_line); # in the loop
or
chomp(@EVENT_ARRAY); # outside the loop
Chomping $_ repeatedly are you are doing is useless since you never use $_.
Back to your question, the only ways to get the output you describe from the code you posted is if:
Would you care to add the following to the end of the code you posted and provide us the output?
{ use Data::Dumper; print(Data::Dumper->new( [ $,, $", $\, $/, \@EVENT_ARRAY, \@array, ], [ '$,', qw( $" $\ $/ $EVENT_ARRAY $array )] )->Useqq(1)->Dump()); }
Update: Fixed bad D::D syntax
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: foreach - adding newlines?
by nitehawk (Initiate) on Feb 09, 2009 at 20:47 UTC | |
by almut (Canon) on Feb 09, 2009 at 21:32 UTC | |
by johngg (Canon) on Feb 09, 2009 at 23:09 UTC | |
by ikegami (Patriarch) on Feb 09, 2009 at 21:43 UTC | |
|
Re^2: foreach - adding newlines?
by runrig (Abbot) on Feb 09, 2009 at 20:48 UTC | |
by nitehawk (Initiate) on Feb 09, 2009 at 21:07 UTC | |
by ikegami (Patriarch) on Feb 09, 2009 at 21:42 UTC | |
by runrig (Abbot) on Feb 09, 2009 at 22:03 UTC | |
by ikegami (Patriarch) on Feb 09, 2009 at 22:25 UTC | |
by runrig (Abbot) on Feb 10, 2009 at 03:15 UTC | |
|