467,179 Members | 1,235 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,179 developers. It's quick & easy.

Including a shell script file in Perl

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?

Jul 10 '08 #1
  • viewed: 1771
1 Reply
Expert Mod 2GB
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.


Jul 11 '08 #2

Post your reply

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

Similar topics

2 posts views Thread by Jorgen Grahn | last post: by
2 posts views Thread by Mohsin | last post: by
1 post views Thread by speedster | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.