On Mon, Mar 8, 2010 at 10:00 PM, Ryan Chan <ryanchan...@gmail.com> 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: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> 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: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to