Re: Run an external program and capture its output

2014-04-18 Thread Matthew . Persico
w O. Persico Lazard 30 Rockefeller Plaza New York, NY 10112 212 632 6136 From: Matthew Persico/ITS/Lazard To: kmx Cc: win32-vanilla@perl.org Date: 04/17/2014 10:29 AM Subject:Re: Run an external program and capture its output I've been fighting a few Windows boxes here that

Re: Run an external program and capture its output

2014-04-17 Thread John Emmas
On 17/04/2014 15:06, John R. Hogerhuis wrote: In what you show you are using single quotes. In the example I think you were trying, back ticks are used. It matters. Wow... VERY well spotted John. After switching to back ticks it now seems to be working on all 3 platforms!!! A huge vote

Re: Run an external program and capture its output

2014-04-17 Thread Matthew . Persico
07:53 AM Subject: Re: Run an external program and capture its output On 17.4.2014 13:49, John Emmas wrote: > On 17/04/2014 11:34, sisyph...@optusnet.com.au wrote: >> . >>> This is one that comes up from time to time - it's not specific to >>> Strawberry Perl,

Re: Run an external program and capture its output

2014-04-17 Thread kmx
On 17.4.2014 13:49, John Emmas wrote: On 17/04/2014 11:34, sisyph...@optusnet.com.au wrote: . This is one that comes up from time to time - it's not specific to Strawberry Perl, and has to do with file associations and something else a registry setting ? ... I can never remember the deta

Re: Run an external program and capture its output

2014-04-17 Thread John Emmas
On 17/04/2014 11:34, sisyph...@optusnet.com.au wrote: . This is one that comes up from time to time - it's not specific to Strawberry Perl, and has to do with file associations and something else a registry setting ? ... I can never remember the details, nor of how to search for it. Aaa

Re: Run an external program and capture its output

2014-04-17 Thread sisyphus1
-Original Message- From: sisyph...@optusnet.com.au This is one that comes up from time to time - it's not specific to Strawberry Perl, and has to do with file associations and something else a registry setting ? ... I can never remember the details, nor of how to search for it

Re: Run an external program and capture its output

2014-04-17 Thread sisyphus1
From: John Emmas Sent: Thursday, April 17, 2014 4:47 PM my_perl_script.pl > output.txt This is one that comes up from time to time - it's not specific to Strawberry Perl, and has to do with file associations and something else a registry setting ? ... I can never remember the details,

Re: Run an external program and capture its output

2014-04-17 Thread John Emmas
On 17/04/2014 10:02, John Emmas wrote: if I run this command (directly from a DOS Command Prompt) it does populate 'test.txt' with the expected output:- gtk-update-icon-cache --force --ignore-theme-index --source builtin_icons gtk/stock-icons > test.txt So in other words, the actual

Re: Run an external program and capture its output

2014-04-17 Thread John Emmas
BTW - I should have added that if I run this command (directly from a DOS Command Prompt) it does populate 'test.txt' with the expected output:- gtk-update-icon-cache --force --ignore-theme-index --source builtin_icons gtk/stock-icons > test.txt So in other words, the actual command

Re: Run an external program and capture its output

2014-04-17 Thread John Emmas
On 17/04/2014 08:36, kmx wrote: FWIW, the my $output = `the_exe_name arg1 arg2`; way is to capture just STDOUT - _not_ STDERR. Regardless of OS. Many thanks. As it happens, I'm only interested in capturing stdout. I tried 3 x variations, based on your suggestions:- Attempt #1:

Re: Run an external program and capture its output

2014-04-17 Thread kmx
On 17.4.2014 9:24, Sergei Steshenko wrote: From: kmx To: win32-vanilla@perl.org Sent: Thursday, April 17, 2014 10:14 AM Subject: Re: Run an external program and capture its output On 17.4.2014 8:47, John Emmas wrote: Firstly, please forgive me if this isn&#

Re: Run an external program and capture its output

2014-04-17 Thread kmx
On 17.4.2014 8:47, John Emmas wrote: Firstly, please forgive me if this isn't the right place for asking this question. I tried a couple of programmer's forums but up to now, my question hasn't even gained one answer! And yet it seems like a simple (and probably very common) requirement. I'