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


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] What are these doing? In reply to
Cheers.

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