Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Output redirection -- hard

by bikeNomad (Priest)
on Aug 07, 2001 at 08:14 UTC ( #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
Node Status?
node history
Node Type: note [id://102693]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2021-05-17 22:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (168 votes). Check out past polls.

    Notices?