Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I don't want to print a tab at the end...is there a way to do this with a "foreach" loop? Maybe a "special" char that says I am at the end of the array? ie: print "\t" unless EOAforeach (@data) { print "$_"; print "\t"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: looping idiom
by theguvnor (Chaplain) on Mar 07, 2002 at 03:25 UTC | |
|
Re: looping idiom
by japhy (Canon) on Mar 07, 2002 at 03:27 UTC | |
|
Re: looping idiom
by BeernuT (Pilgrim) on Mar 07, 2002 at 03:29 UTC | |
|
Re: looping idiom
by mrbbking (Hermit) on Mar 07, 2002 at 13:58 UTC | |
|
Re: looping idiom
by Sidhekin (Priest) on Mar 07, 2002 at 15:58 UTC |