in reply to How to "source" a shell file in Perl?
> I'm unable to use a wrapper script that sources the file and then calls the Perl script ...
well that's the only sane solution, buddy.
> The shell script file isn't simply a set of "export VAR=VALUE" where I can simply parse the file...
Too bad, you can't export variables to a parent process.
The only (insane) solution which come to my mind is to call a shell script which sources your stuff and dumps it somewhere where the parent Perl can restore it from, e.g a file or piped to STDOUT.
That's such an insane approach that I don't even wanna elaborate more on it.
Maybe try to find some ksh, csh or sh ready to use snippets, able to export JSON.
> for political reasons.
Send them here and I'll tell them they are idiots.
Cheers Rolf
( addicted to the Perl Programming Language)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to "source" a shell file in Perl?
by jfroebe (Parson) on Jun 12, 2013 at 19:33 UTC | |
by LanX (Saint) on Jun 12, 2013 at 20:04 UTC | |
by jfroebe (Parson) on Jun 12, 2013 at 20:46 UTC | |
by LanX (Saint) on Jun 12, 2013 at 20:50 UTC | |
by LanX (Saint) on Jun 12, 2013 at 19:40 UTC |