Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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: (8)
As of 2014-09-20 09:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (158 votes), past polls