list assignment

2010-04-20 Thread srd
#!/usr/bin/env perl use warnings; use strict; my $x= (1,2,3); print $x,"\n"; exit(0); * output: Useless use of a constant in void context at ./try.plx line 4. 3 * If we put $x=(1,2) then we get 2 without the error message. Can

Re: list assignment

2010-04-21 Thread srd
What really needs an explanation is if the array contains n elements then (n-2) warnings are emitted. maybe i was not so clear about my question -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/