Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Is it evaluated in scalar or list context?

by Kenosis (Priest)
on Jan 19, 2013 at 17:58 UTC ( [id://1014221]=note: print w/replies, xml ) Need Help??


in reply to Is it evaluated in scalar or list context?

In your example, my ($var1, $var2, $var3, $var4); is used to declare, not assign:

my $var = something; # declare then assign in scalar context my ($var) = something; # declare then assign in list context ... my ($var1, $var2, $var3, $var4); # declare $var1 = something1 ; # assign in scalar context $var2 = something2 ; # assign in scalar context $var3 = something3 ; # assign in scalar context $var4 = something4 ; # assign in scalar context

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 12:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found