Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 avoiding work at the Monastery: (13)
As of 2014-09-18 18:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (120 votes), past polls