Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 studying the Monastery: (7)
As of 2014-09-18 20:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (124 votes), past polls