Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Is it evaluated in scalar or list context?

by Athanasius (Monsignor)
on Jan 20, 2013 at 04:13 UTC ( #1014248=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my  $var  = something;    # scalar context
    my ($var) = something;    # list context
    
  2. or download this
    use Modern::Perl;
    
    ...
    
        return wantarray ? @_ : $_[0];
    }
    
  3. or download this
    14:04 >perl 488_SoPW.pl
    (a): is in scalar context
    ...
    (b): is in void context
    
    14:08 >
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2014-09-22 16:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (198 votes), past polls