david wrote:
> sub main::open{
>         #-- testing purpose
>         if($_[0] =~ m#^/#){
>                 die("Access under / not allowed\n");
>         }else{
>                 open(FILE,$_[0]) || die $!;
>                 return FILE;
>         }
> }
> 
> my $fh = &open('whatever');

oh, i didn't know you could do that :-) cool. that's what i'm looking for.

the point is, i have an unknown perl code, possibly dangerous, and i 
want to execute it in a controlled environment. i couldn't manually 
change the code, so creating a wrapper like the above is just what i 
need. thanks.

-- 
dave


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to