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'
|
|---|