JockoHelios has asked for the wisdom of the Perl Monks concerning the following question:
I'm loading a text file into an array. The text file has data saved from a previous array, example:
20130516,530,730To confirm that the data is loaded into the array, I printed out the loaded array using this code:
print "@LoadedArray";All the data prints out as is it is in the text file, with one exception. After the first row of the loaded array is printed, each subsequent row has one extra space in front of it. Example, using underscores to simulate the added space:
20130516,530,730When I print the array using the following code:
foreach $ArrayRow( @LoadedArray ) { print "$ArrayRow"; }the added spaces don't appear - the data prints as it is in the text file.
I don't think this is really a problem, just a curiosity I found (fingers crossed).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Space prepended to Array Print
by toolic (Bishop) on Jun 07, 2013 at 18:54 UTC | |
by JockoHelios (Scribe) on Jun 07, 2013 at 19:03 UTC | |
|
Re: Space prepended to Array Print
by Laurent_R (Canon) on Jun 07, 2013 at 18:57 UTC | |
by JockoHelios (Scribe) on Jun 07, 2013 at 19:05 UTC | |
|
Re: Space prepended to Array Print
by 2teez (Vicar) on Jun 07, 2013 at 19:16 UTC | |
|
Re: Space prepended to Array Print
by Anonymous Monk on Jun 07, 2013 at 21:45 UTC | |
|
Re: Space prepended to Array Print
by grondilu (Friar) on Jun 08, 2013 at 07:46 UTC | |
by choroba (Cardinal) on Jun 08, 2013 at 07:57 UTC |