in reply to Argument list item alias-ing
Will run. Which is weirdYou're actually matching the string as you're using the balanced delimiters syntax of a regex match e.g
But if you change that sub name to replace then you get the expected error messageshell> perl -MO=Deparse - sub m{ local *_=\$_[0]; s///; } m("String"); sub m { local *_ = \$_[0]; s///; } /"String"/; - syntax OK
sub replace { local *_=\$_[0]; s///; } replace("String"); Modification of a read-only value attempted at pmsopw_250834.pl line 3 +.
_________
broquaint
|
|---|