Help for this page
# Array evaluated in scalar context.
my $count = @array;
# The s/// operates on $copy.
(my $copy = $str) =~ s/\\/\\\\/g;
# Prints $x.
print($x = $y);
# Array evaluated in list context.
my @copy = @array;
# Only dies if f() returns an empty list.
# This does not die if f() returns a
# false scalar like zero or undef.
my ($x) = f() or die;
my $count = () = f();
# Prints @x.
print(@x = @y);
Once (shame on you!)
Twice (shame on me!)
More often than I'd like to be
All the time
Just when answering stupid polls
Who you callin' a fool?
I refuse to vote in this ridiculous poll
Results (445 votes). Check out past polls.