Re: help explaining for this script

2005-11-16 Thread Jeff 'japhy' Pinyan
On Nov 16, Paul Johnson said: On Tue, Nov 15, 2005 at 06:48:40PM -0500, Jeff 'japhy' Pinyan wrote: whereas if $_[1] is tainted, then the eval { ... } returns false since a fatal error is raised because eval 1 . substr($_[0], 0, 0) is illegal if $_[0] is tainted. I would be wary of even t

Re: help explaining for this script

2005-11-16 Thread Paul Johnson
On Tue, Nov 15, 2005 at 06:48:40PM -0500, Jeff 'japhy' Pinyan wrote: [ ... ] > *whew* > > Frankly, I find the 'eval "1 || $blank" || 1' silly, since the whole > reason the '... || 1' is needed is since $blank is a blank string and the > code '1 || ' is invalid Perl. Long story short, I'd have

Re: Re: help explaining for this script

2005-11-15 Thread Jennifer Garner
Thanks for Jeff's explaining.I'm appreciated for that. On Tue, 15 Nov 2005 18:48:40 -0500 (EST), Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote: > On Nov 15, Jennifer Garner said: > >> I can't understand for this script below,I want somebody here to give me >> some help.Thanks. >> >> sub is_tain

Re: help explaining for this script

2005-11-15 Thread Jeff 'japhy' Pinyan
On Nov 15, Jennifer Garner said: I can't understand for this script below,I want somebody here to give me some help.Thanks. sub is_tainted{ my $var=shift; my $blank=substr($var,0,0); return not eval {eval "1 || $blank" || 1}; } That subroutine estimate for if some given var is tainte