Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
sub cleanup { if ( $_[0] ) { $_[0]=~s/<//g; $_[0]=~s/>//g; $_[0]=~s/;//g; $_[0]=~s/\(//g; $_[0]=~s/\)//g; $_[0]=~s/\"//g; $_[0]=~s/\'//g; $_[0]=~s/\?//g; $_[0]=~s/script//g; $_[0]=~s/\///g; $_[0]=~s/>//g; $_[0]=~s/\*//g; return $_[0]; } else { # I don't think this is the right way of doing it! return ''; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Return Question in Subroutine
by eric256 (Parson) on Apr 28, 2006 at 14:47 UTC | |
|
Re: Return Question in Subroutine
by philcrow (Priest) on Apr 28, 2006 at 13:27 UTC | |
by Anonymous Monk on Apr 28, 2006 at 13:59 UTC | |
|
Re: Return Question in Subroutine
by GrandFather (Saint) on Apr 28, 2006 at 12:57 UTC | |
by Anonymous Monk on Apr 28, 2006 at 13:05 UTC | |
by GrandFather (Saint) on Apr 28, 2006 at 13:18 UTC | |
|
Re: Return Question in Subroutine
by Herkum (Parson) on Apr 28, 2006 at 13:25 UTC | |
by Anonymous Monk on Apr 28, 2006 at 13:44 UTC | |
|
Re: Return Question in Subroutine
by GrandFather (Saint) on Apr 28, 2006 at 13:24 UTC | |
|
Re: Return Question in Subroutine
by thundergnat (Deacon) on Apr 28, 2006 at 14:40 UTC | |
|
Re: Return Question in Subroutine
by nimdokk (Vicar) on Apr 28, 2006 at 13:00 UTC | |
|