Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Executing / Retrieving Output from Command

by rpike (Scribe)
on Mar 15, 2010 at 19:57 UTC ( #828780=note: print w/ replies, xml ) Need Help??


in reply to Executing / Retrieving Output from Command

My apologies, I was sure I had posted the few lines I had in the script. There are only a couple of lines in it because all it's doing is taking a .gz file and trying to unzip it. I tried this :

results = `gunzip -cf <C:/temp/decrypt/out-3908.gz`; print $results;
and this to see
eval("results = `gunzip -cf <C:/temp/decrypt/out-3908.gz`"); print $results . " | " . $!;


Comment on Re: Executing / Retrieving Output from Command
Select or Download Code
Re^2: Executing / Retrieving Output from Command
by Corion (Pope) on Mar 15, 2010 at 19:59 UTC
    eval("results = `gunzip -cf <C:/temp/decrypt/out-3908.gz`");

    will likely be an error, because the backticks get interpolated in your double quotes. So unless gunzip -cf <C:/temp/decrypt/out-3908.gz returns Perl code, that won't work.

Re^2: Executing / Retrieving Output from Command
by BrowserUk (Pope) on Mar 15, 2010 at 20:22 UTC

    How big is the file you're unzipping?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (15)
As of 2014-07-31 13:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (248 votes), past polls