Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^6: substr oddity

by Anonymous Monk
on Mar 04, 2005 at 23:12 UTC ( #436801=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    print "Alive!\n"; # not reached
    __END__
    substr outside of string at - line 4.
    
  2. or download this
    use strict;
    use warnings;
    ...
    bar($x);
    print "$x\n"; #prints 10
    sub bar { $_[0]=10; } # does $x=10, essentially
    
  3. or download this
    substr($x,2,1)=10
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://436801]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2018-01-19 14:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (219 votes). Check out past polls.

    Notices?