G'day Cody Fendant,
Yes, I can make that silently fail too:
$ perl -e '$result = `foobar`'
But I start getting feedback if I ask for it (i.e. with strict and warnings):
$ perl -Mstrict -Mwarnings -e '$result = `foobar`' Global symbol "$result" requires explicit package name at -e line 1. Execution of -e aborted due to compilation errors.
OK, let's fix up that one from strict:
$ perl -Mstrict -Mwarnings -e 'my $result = `foobar`' Can't exec "foobar": No such file or directory at -e line 1.
Now this one from warnings which clears all errors:
$ perl -Mstrict -Mwarnings -e 'my $result = `ls`'
Given you're working in a CGI environment, you may find the fatalsToBrowser feature of CGI::Carp to be useful.
-- Ken
In reply to Re: Running a backticks command in a CGI script
by kcott
in thread Running a backticks command in a CGI script
by Cody Fendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |