Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Pearls (not really) of Perl programming

by trammell (Priest)
on Nov 24, 2004 at 17:12 UTC ( #410178=note: print w/ replies, xml ) Need Help??


in reply to Pearls (not really) of Perl programming

Code to "scrub" CGI inputs:
s/\&\;\`\'\\\"\|\*\?\~\<\>\^\(\)\[\]\{\}\$\n\r//g;

Replies are listed 'Best First'.
Re^2: Pearls (not really) of Perl programming
by apotheon (Deacon) on Nov 25, 2004 at 06:06 UTC

    That belongs in the obfuscated code section, perhaps as part of a larger script full of such stuff.

    - apotheon
    CopyWrite Chad Perrin

Re^2: Pearls (not really) of Perl programming
by Roy Johnson (Monsignor) on Nov 27, 2004 at 00:59 UTC
    Should those all have alternators between them? If not, it's looking for a specific string. Of course, it should use tr instead, but I presume that's why it's bad code.

    Caution: Contents may have been coded under pressure.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2016-07-27 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (242 votes). Check out past polls.