habit_forming has asked for the wisdom of the Perl Monks concerning the following question:
Does not work where as:#!/usr/bin/perl -T use warnings; use strict; use Safe; my $s = new Safe 'SAFE'; $s->permit(qw( print )); $s->share_from('main',['*STDOUT']); $s->rdo('do.pl'); if($@){ print "Error: $@"; } else { print "No Error.\n"; }
Works like a champ!#!/usr/bin/perl #Notice NO -T use warnings; use strict; use Safe; my $s = new Safe 'SAFE'; $s->permit(qw( print )); $s->share_from('main',['*STDOUT']); $s->rdo('do.pl'); if($@){ print "Error: $@"; } else { print "No Error.\n"; }
#!/usr/bin/perl print STDOUT "This is the client script.\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: -T and Safe.pm
by Joost (Canon) on Feb 16, 2005 at 19:48 UTC | |
|
Re: -T and Safe.pm
by jbrugger (Parson) on Feb 16, 2005 at 19:08 UTC |