in reply to Re: pass perl variable to shell script
in thread pass perl variable to shell script

Thank you rovf. Yes, I can write the variable into a file, but this sounds complex. I am looking for a simpler solution like your suggestion to right into stdout. Could you elaborate on your answer? Why would I eval it on the output of the perl if I need to access it in the shell. I thought maybe to write to a stdout in the perl, and then somehow get it in the shell. A code snippet would be helpful. Thanks much.
  • Comment on Re^2: pass perl variable to shell script

Replies are listed 'Best First'.
Re^3: pass perl variable to shell script
by rovf (Priest) on Aug 12, 2010 at 07:37 UTC

    #!/bin/sh eval `perl -we "print FOO=BAR"` echo $FOO

    -- 
    Ronald Fischer <ynnor@mm.st>