Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Modules to handle backticks?

by Kanji (Parson)
on Nov 24, 2002 at 03:15 UTC ( [id://215468]=note: print w/replies, xml ) Need Help??


in reply to Modules to handle backticks?

You might want to take at a few of the IPC:: modules like IPC::Open3 (alt.) and IPC::Run (alt.), but an alternative on platforms that support descriptor redirection is something like ...

# adapted from the Perl Cookbook, 16.9 @all = `( cmd | perl -pe "s/^/stdout: /" ) 2>&1`; for (@all) { push @{ s/stdout: // ? \@out : \@err }, $_ }

    --k.


Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://215468]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (8)
As of 2024-04-24 10:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found