in reply to Re: Security?
in thread Security?

I think the intent there was to do a tr/// and remove "unsafe" characters; e.g., |, >, <, etc. But the guy apparently had no clue what he was doing. ;)
The sub was obviously not tested; otherwise, it would be obvious that it doesn't work...

--perlplexer

Replies are listed 'Best First'.
Re: Re: Re: Security?
by grantm (Parson) on Apr 24, 2003 at 02:23 UTC

    I also initially wondered whether it was meant to be a tr/// rather than a s/// but the presence of &#91; in the pattern seemed to contradict that assumption. The fact that square brackets were being treated as potentially evil led me to wonder if the code had originated in a Tcl script :-)

Re: Re: Re: Security?
by antirice (Priest) on Apr 24, 2003 at 02:10 UTC
    Actually, he's been using it in his scripts for over a year now.

    antirice    
    The first rule of Perl club is - use Perl
    The
    ith rule of Perl club is - follow rule i - 1 for i > 1

      Well, you may as well tell him that this sub wasted a lot of CPU cycles. ;) It compiles and it runs but it doesn't do anything useful.

      --perlplexer