For Quality purpouses, Rob Dixon 's mail on Tuesday 27 January 2004 00:30 may 
have been monitored or recorded as:

> The right conclusion for the wrong reasons Wolf! The spaces are the result
> of interpolating the array into a string, and the presence of a newline on
> each array element is immaterial:
>
>   my @arr = ('A', 'B', 'C', 'D');
>   print "@arr\n";
>   print @arr, "\n";
>
> **OUTPUT
>
>   A B C D
>   ABCD

Hi Rob, 

well, maybe Im totally wrong here, but getting these results :

$last printed out
TMR2,mpd_gw,50,w32-ix86,client
TMR2,mpd_gw,50,w32-ix86,client
TMR2,mpd_gw,50,w32-ix86,client
TMR2,mpd_gw,50,w32-ix86,client


@temparray printed out
TMR2,mpd_gw,50,w32-ix86,client
 TMR2,mpd_gw,50,w32-ix86,client
 TMR2,mpd_gw,50,w32-ix86,client
 TMR2,mpd_gw,50,w32-ix86,client
 

from this code:

Code:
if (something){
$last = "$tmrname,$gateway_hash{$gateway},$version,$interp,$type\n";
        #print "$last";
        push(@temparray, $last);
} 

@temparray = sort @temparray;
print "@temparray";

Anthony asked, where the spaces came from, expecting the output of $last and 
@temparray to be the same.
Of course, you are right about the interpolation used before the print : i 
just meant to point out that the newlines AND the spaces in his print 
"@temparray" are a result of the quotes used with print, and his attachment 
of \n to $last before the push @temparray,$last -  without making it to 
complicated.
(Tim also hinted to $").

Or did I totaly miss something.

thx, wolf 










--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to