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

Re^3: the basic datatypes, three

by merlyn (Sage)
on Jan 24, 2006 at 14:10 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-19 10:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found