[Buffalo-pm] Asterisk Wildcard When Running Command viaExec...
DANIEL MAGNUSZEWSKI
dmagnuszewski at mandtbank.com
Thu Jul 6 13:35:12 PDT 2006
I can't get your 'one-liner' to return anything, which is odd.
>>> "Ben. B." <bennymack at gmail.com> 07/06/06 4:23 PM >>>
My thoughts would be that the exec doesn't return anything meaningful
so you'll need a way to capture the output to send to the browser.
The glob() function is synonymous with the <*> syntax but the <*> is
only available on later Perl's so use glob() to be sure.
My example, though meant to be run on the command line, should be
adaptable to a CGI script. That way you can get the output from the
$grep handle.
Regarding your regex, I'd say also remove newlines and carriage
returns:
$cgi->param('host') =~ /[^\w\d\-]/sg;
Might do it?
More information about the Buffalo-pm
mailing list