greenworld 0 Posted February 13, 2006 Share Posted February 13, 2006 Hello; I want to be sure on writing the perl address, I did ask this before and I got the right answer, now in the code page of perl that I have, there is already a perl address, here it is: #!/usr/bin/perl I have got the perl address before and it is: /usr/bin/perl there are two signs in the beginning which make me confused: If you know perl, I appreciate your help, should I remove those signs or not? Thank You for your help Quote Link to post Share on other sites
TCH-Bruce 16 Posted February 13, 2006 Share Posted February 13, 2006 The first line is the correct way to include the path to perl in your scripts. #!/usr/bin/perl The #! is called a shebang. This line instructs the operating system the Perl script is being ran in where the executable for Perl and all of its associated files are located. This line is commonly only required in Linux and UNIX variants, users running Perl in Microsoft Windows do not need this line. Quote Link to post Share on other sites
greenworld 0 Posted February 13, 2006 Author Share Posted February 13, 2006 OK, I got it, Thanks a lot Quote Link to post Share on other sites
TCH-BillH 0 Posted February 14, 2006 Share Posted February 14, 2006 Hi, I'll add that Bruce is right on and this difference between Linux and Widows will often create havoc in testing enviroments if you are testing in a Windows environment and running production on Linux. Some Perl versions of Windows will not run with the #! in the beginning. Thus a windows programmer can get very frustrated when he has tested his code, uploaded it, and then it doesn't work just because of a simple #!. Not fun! Keep your eye out! Take care, Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.