Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Re: [substr] anomaly or mine?

by Chmrr (Vicar)
on Aug 20, 2002 at 01:47 UTC ( #191364=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: [substr] anomaly or mine?
in thread [substr] anomaly or mine?

My intuition would expect:

my $s = 'ABCDE'; print substr($s,0,2)='',$/; # EXPECT '', GET 'cd'? print substr($s,0,2)='foo',$/; # EXPECT 'foo', GET 'fo'?

..in parallel with all other assignments:

my $s = 'ABCDE'; print $s='',$/; # EXPECT '' print $s='foo',$/; # EXPECT 'foo'

perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'


Comment on Re: Re: Re: [substr] anomaly or mine?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (12)
As of 2014-07-30 14:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (234 votes), past polls