Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2015-07-07 22:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls