On Tue, 5 Jul 2005, Alex Brelsfoard wrote:

> OK, so I know there's an easy-ish way to handle this situation.  But I'm
> currently running in circles, not finding the solution.  Basically what I'm
> trying to do is run a system command (with either `command` or
> system("commnad") ) and retrieve the printed result form the command into a
> variable of some sort.
> So think of it this way:
> my $info = `ls`;

And this doesn't work?  Is your command outputting on STDOUT or STDERR? If it's 
dumping its output on STDERR, try adding "2>&1" to the end of your command in 
back-ticks, that will redirect STDERR to STDOUT, and might get the output 
captured properly (though I haven't tried it).

Tim Wilde

-- 
Tim Wilde
[EMAIL PROTECTED]
Systems Administrator
Dynamic Network Services, Inc.
http://www.dyndns.com/
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to