Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Is it evaluated in scalar or list context?

by Kenosis (Priest)
on Jan 19, 2013 at 17:58 UTC ( #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


Comment on Re: Is it evaluated in scalar or list context?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2015-07-07 18:38 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