Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: redirecting output from a system command to a text file

by mellon85 (Monk)
on Apr 19, 2011 at 18:21 UTC ( #900185=note: print w/ replies, xml ) Need Help??


in reply to redirecting output from a system command to a text file

You are on Win and using bash redirection? I'm not familiar at all with the Win environment. As a stupid workaround I would just do

open my $input "./TVT.exe Tes...._235516.pdf|"; open my $output "test.txt" foreach (<$output>) { print $output,$_; }


Comment on Re: redirecting output from a system command to a text file
Download Code
Replies are listed 'Best First'.
Re^2: redirecting output from a system command to a text file
by mark4444az (Sexton) on Apr 19, 2011 at 18:46 UTC
    Hmm, the problem with that is i need to use the $a variable like this: open my $input "./TVT.exe $a|"; "string found where operator expected" there. I am runniing this on an xp machine using a cygwin console.
      Missing comma,
      open my $input,"TVT.exe Tes...._235516.pdf|" or die "$!";
      there might be an issue with ./

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2015-07-08 03:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls