uksza has asked for the wisdom of the Perl Monks concerning the following question:
Hello wise monks,
is any better (more elegant) way to do it:
thanks for yours wisdom,
Lukasz
is any better (more elegant) way to do it:
my @array = qw/one two three/; my @out; push @out,"@array\n"; #push @out, reverse @array; <-- "threetwoone" push @out, "@{[reverse @array]}"; print @out;
thanks for yours wisdom,
Lukasz
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Push and list context
by Errto (Vicar) on Mar 14, 2005 at 23:34 UTC | |
Re: Push and list context
by Mugatu (Monk) on Mar 14, 2005 at 23:28 UTC | |
Re: Push and list context
by tlm (Prior) on Mar 15, 2005 at 02:37 UTC | |
Re: Push and list context
by sh1tn (Priest) on Mar 14, 2005 at 23:49 UTC | |
Re: Push and list context
by tphyahoo (Vicar) on Mar 15, 2005 at 11:56 UTC | |
by Mugatu (Monk) on Mar 15, 2005 at 16:53 UTC |
Back to
Seekers of Perl Wisdom