Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re^3: the basic datatypes, three

by merlyn (Sage)
on Jan 24, 2006 at 14:10 UTC ( #525179=note: print w/ replies, xml ) Need Help??

in reply to Re^2: the basic datatypes, three
in thread the basic datatypes, three

The "scalar" op is needed only to provide scalar context in an otherwise list context space. For example:

my @lengths = scalar @x, scalar @y, scalar @z; # but... my $length_x = @x; my $length_y = @y; my $length_z = @z;
The scalar is needed in the first example because the array names are in a list context otherwise.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Comment on Re^3: the basic datatypes, three
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://525179]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2015-11-27 11:49 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (727 votes), past polls