Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Output redirection -- hard

by bikeNomad (Priest)
on Aug 07, 2001 at 08:14 UTC ( [id://102693]=note: print w/replies, xml ) Need Help??


in reply to Output redirection -- hard

I assume you have a unix system, or the /dev/null reference wouldn't work (you don't say).

Before you spend much more time in Perl, can you get this program to work quietly from the shell? I can't see why your program would interpret '2>&1' or '|' as arguments, or why you get the 'ambiguous redirect' error. Are you sure that your Perl is using a standard (i.e. non-csh) shell? Perl should call something like '/bin/sh -c', which should then eat the redirection characters.

I'd try to run this program from the shell first, and then use the same command line for perl's system command (assuming you don't have to feed the program anything via a pipe or something). If that fails, perhaps Perl is using the wrong shell.

If the program is doing something dumb like talking to /dev/tty, you might have to use something more industrial-strength to talk to this program, like using /dev/pty*, etc.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-04-25 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found