Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 lurking in the Monastery: (7)
As of 2014-07-12 13:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (240 votes), past polls