hi...

i'm trying to play with running some apps from within a perl script. i'm
having some issues with figuring out how to capture the stdout that the app
would generate within the perl script...

a sample of code:

my $fcmd = "system function arg1 arg2";
my $res = qx{$fcmd};
my $res = `$fcmd`;
my $res = system($fcmd);

if ($res =~ /foo/)
{
  it passes
}
else
{
  it fails..
}
i'm trying to return the stderr/stdout of the function so i can parse it to
determine if the function/app failed/passed...

however, in all cases, $res has no value. if i run the content of $fcmd from
the command line, the command works ok, so i'm having an issue trying to
figure out exactly how to capture the actual output being returned/generated
by the $fcmd...

any thoughts/comments/examples would be greatly appreciated!!!

in looking through google, i would have thought i'm doing it correctly.. but
obviously i'm not!!!

thanks

-bruce

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to