iamravikanth has asked for the wisdom of the Perl Monks concerning the following question:
Could anyone kindly explain why this is happening and what is the solution to this. Regards, Ravi.my @array; $i=0; while($i<5) { push(@array,$i); push(@array,"\n"); $i++; } print "@array"; Result : 0 1 2 3 4
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Space character when using push function on arrays
by roboticus (Chancellor) on Jul 15, 2010 at 11:13 UTC | |
|
Re: Space character when using push function on arrays
by FunkyMonk (Bishop) on Jul 15, 2010 at 11:21 UTC | |
|
Re: Space character when using push function on arrays
by Anonymous Monk on Jul 15, 2010 at 11:15 UTC | |
|
Re: Space character when using push function on arrays
by nvivek (Vicar) on Jul 15, 2010 at 12:13 UTC | |
|
Re: Space character when using push function on arrays
by TedPride (Priest) on Jul 15, 2010 at 19:11 UTC | |
by iamravikanth (Novice) on Jul 15, 2010 at 19:57 UTC |