You could use the comma:
use strict; use warnings; my @x; push @x, "this"; push @x, "that"; print "This is \@x:\n"; print @x; print "\n\nThis is \@x\\n:\n"; print @x ,"\n"; __OUTPUT__ This is @x: thisthat This is @x\n: thisthat
In reply to Re: Printing Arrays in Scalar Context
by tirwhan
in thread Printing Arrays in Scalar Context
by madbombX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |