mike@/deb40a:~/perl> perl -v
This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
mike@/deb40a:~/perl> perl -we '
@list=qw/Perl is cool./;print( "list=\t", map { "$_," } @list, "\n");
'
list= Perl,is,cool.,
,mike@/deb40a:~/perl>
Could someone tell me why there is a comma printed after the
> "MM" == Mike McClain writes:
MM> mike@/deb40a:~/perl> perl -we '
MM> @list=qw/Perl is cool./;print( "list=\t", map { "$_," } @list, "\n");
MM> '
MM> list= Perl,is,cool.,
MM> ,mike@/deb40a:~/perl>
MM> Could someone tell me why there is a comma printed after the newline?
becau
On Sat, Nov 13, 2010 at 05:43:21AM -0500, Uri Guttman wrote:
> > "MM" == Mike McClain writes:
> MM> Could someone tell me why there is a comma printed after the newline?
> because you put it there. the \n is input to the map, not the print!
> map's last arg is a list and it takes @list AND