Help for this page
$x = `echo foo`;
$ cat t.pl use strict; ... print "OK, command is done!\n\n"; print "Now let's see what we captured:\n<$x>\n";
$ perl t.pl Let's do a command: ... Now let's see what we captured: <foo >
print $x;
my @results = `command`;
my @foo = grep /foo/ @results;
if (0 == @foo) { print "The command didn't find 'foo'\n"; ... else { print "Found 'foo'!\n"; }
# Do the thing my @results = `command`; ... else { print "Found 'foo'!\n"; }
www.com | www.net | www.org
No recent polls found