Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^9: Getting an unknown error (thats just the way it is)

by Anonymous Monk
on Apr 25, 2015 at 01:10 UTC ( [id://1124640]=note: print w/replies, xml ) Need Help??


in reply to Re^8: Getting an unknown error (foreach $1 breaks m//atch)
in thread Getting an unknown error

...It certainly aliases $1 and this is certainly not a good idea, but matching is not broken. (Please see example code below.) ... This is just the way aliasing works

this is just the way something works is the weakest of argument ...

AnomalousMonk , its a bug, warnings doesn't warn

It never occurred to me to try using $1 for anything other than retrieving regex matches

It never even occurred to me to try $1='something' but you can't do that

This is not a feature, its just an oversight

warnings should help the idiot who uses $1 for something other than retrieving regex matches

documentation updates are not any kind of solution

$ perl -le" for my $1 ( 666 ){ print $1 } " Can't use global $1 in "my" at -e line 1, near "my $1 " Execution of -e aborted due to compilation errors.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-26 08:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found