Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: How to persist variable created in shell script called from Perl after shell script finished execution?

by NetWallah (Canon)
on Feb 24, 2014 at 04:14 UTC ( [id://1075931]=note: print w/replies, xml ) Need Help??


in reply to How to persist variable created in shell script called from Perl after shell script finished execution?

The most common way to get data from a shell command/script is to read the STDOUT from that script, typically using the 'qx' command.

If STDOUT is already being used for other purposes, you could create and write to a "Named Pipe" using the linux "mkfifo" comman to create, and a standard "echo xxx > pipe/name" to send data, while th perl script reads from the pipe.

A less efficient way would be to persist data to an actual file on the file system.

        What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
              -Larry Wall, 1992

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-03-28 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found