By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,903 Members | 1,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,903 IT Pros & Developers. It's quick & easy.

Including a shell script file in Perl

P: 4
Hi All,

I have a bunch of shell script files that use a common shell script file that contains certain global variables that are declared and initialized or derived by some arithmatic.

I have to now convert one of the shell script file to a perl file so I can use the in-built functions.

Is the a way I can import the file with the globals and use them in my perl script?

Thanks!
Jul 10 '08 #1
Share this Question
Share on Google+
1 Reply


numberwhun
Expert Mod 2.5K+
P: 3,503
Shell script is not Perl code. Granted, you can use the system() function to call a shell script or execute system commands / scripts, but to actually use the code in your script in the manner you describe, you would have to re-write it in Perl instead.

If you want, you can try to do this, and if you get stuck, post your code here. I would also, at that time, suggest you post the original shell script you are trying to convert as well so we can see what your reference point is.

Regards,

Jeff
Jul 11 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.