Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

substr oddity

by Ytrew (Pilgrim)
on Mar 04, 2005 at 05:14 UTC ( #436457=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    foo( substr($x,2,1) ); # crashes here
    print "Alive!\n"; # not reached
    sub foo {}
    
  2. or download this
    use strict;
    use warnings;
    ...
    foo($y); # no-op
    print "Alive\n"; # we get here just fine
    sub foo {}
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2014-07-26 17:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (178 votes), past polls