Gossamer Forum
Home : General : Perl Programming :

What are these doing?

Quote Reply
What are these doing?
Just a quick question...

Messing around with a script and this is present:

$VALUE{'MESSAGE'} =~ tr/\$\\\`\+\<\>\/\;\|/_/;

$VALUE{'MESSAGE'} =~ s/\r//g;

I think the first one is removing potentialy harmful characters from an input (via the form) but what is the second one doing?

--------------------------------
Privacy Software
Quote Reply
Re: [BLOOD] What are these doing? In reply to
The second one is changing \r (enter, or return values) into blanks. For example;

this
is
a
test

would be changed to;

thisisatest

At least thats what I think. I'm not totally definate what \r means Tongue

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] What are these doing? In reply to
Cheers.

--------------------------------
Privacy Software