Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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?
[Corion]: Meh - my "flip the table" string doesn't render here ;)
[choroba]: It renders correctly in pm-cb-g
[erix]: heh
[Veltro]: is it a question?
[erix]: or a conundrum?
[Veltro]: and if I may give you a hint, use qr/\xC2\xB0|\xB0/ instead of the degree sign

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2018-07-17 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (372 votes). Check out past polls.

    Notices?