#!/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 someone please explain why?


-- 
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