Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: running sh script from perl script

by coreolyn (Parson)
on Jul 17, 2002 at 20:22 UTC ( #182569=note: print w/replies, xml ) Need Help??

in reply to running sh script from perl script

When referencing any code in your questions you should utilize <CODE> tags.

Now that thats out of the way, just dump using the sh script and update your variables via the %ENV hash as in $ENV{'JAVA_HOME'} etc.. However if sourcing existing sh files is mandantory, read the source file via your Perl script and regex for the name=value pairs and update the %ENV based on your results.


Replies are listed 'Best First'.
Re: Re: running sh script from perl script
by amit_ra (Initiate) on Jul 18, 2002 at 18:45 UTC
    Thanks...i found the porblem in my perl script....i was using
    $ENV{$key} = chomp($value};
    Whicc is wrong. i should have used
    chomp($value); $ENV{$key} = $value;
    thanks to tye....he/she saved the day..... Amit (amit_ra)

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2023-12-04 12:51 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (25 votes). Check out past polls.