On Mon, Mar 8, 2010 at 10:00 PM, Ryan Chan <[email protected]> wrote: > my ($a, $b, $c, $d, $e) = "test"; > > How I can assign "test" to all the list items? e.g. $a to $e > > > -- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > http://learn.perl.org/ > > >
A bit ugly but works: sal...@salmin:~/test$ ./massass.pl 'test' 'test' 'test' 'test' sal...@salmin:~/test$ cat massass.pl #!/usr/bin/perl use strict; use warnings; my ($a, $b, $c, $d) = split /,/, "test," x 4; print "'$a' '$b' '$c' '$d'\n"; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
