Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: How to find barewords in perl code?

by JavaFan (Canon)
on Jun 01, 2010 at 16:38 UTC ( #842655=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to find barewords in perl code?
in thread How to find barewords in perl code?

Hmmm, forgot about function calls like that. For some reason, I assumed perl would warn. But even this is warning free:
sub foo {shift} sub bar {1} print foo bar;
and just prints 1.

OTOH, in pre-5.6 days, when I was still using bare word file handles, I used all uppercase names, and I use all lowercase for subs, so /(?:print|...)\s+[A-Z]/ would have worked for my code.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://842655]
help
Chatterbox?
[msh210]: I don't have sendmail (I'm on MS Windows), so does one of you think you can report the bug?
[shmem]: msh210: 'tis about time to tell the sad truth to perl5porters - via perlbug
[msh210]: probably whoever wrote that actually knows the truth
[shmem]: msh210: you can save the perlbug text in a file and send that via your mail agent of choice
[msh210]: hm, okay, I'll try, thanks
[shmem]: ...not as an attachment, it's probably better to c&p that into the mail body

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2017-04-24 12:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (439 votes). Check out past polls.