Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Autovivification of scalars in sub calls

by Anonymous Monk
on Dec 08, 2005 at 22:01 UTC ( #515397=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     
    my $var=3;
    mysleep($var); # these two lines are fine
    ...
               sleep($_[0]);
               $_[0]=10;
    }
    
  2. or download this
    $y=substr("hello",10,1); 
    foo($y);# this runs, but substr() generates warnings because the subst
    +r() is outside the string
    
    foo( substr("hello",10,1) ); # this is a fatal error!
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2015-07-31 18:05 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 (280 votes), past polls