s_more
asked on
perl executable path in perl script - win
All,
I'm new to perl..
For windows do we have to mention the perl executable path at the top of the script always -
#! <your perl executable here>
Shirish
I'm new to perl..
For windows do we have to mention the perl executable path at the top of the script always -
#! <your perl executable here>
Shirish
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Tintin,
Is this same for UNIX also ..
Shirish
Is this same for UNIX also ..
Shirish
On Unix systems, the #! line is important, as it tells the Unix kernel how/what to execute the file with, so most Perl scripts on Unix systems start with
#!/usr/bin/perl
as /usr/bin is the usual directory where perl exists.
#!/usr/bin/perl
as /usr/bin is the usual directory where perl exists.
#!perl -flags
The entire path (drive letter, colon, path, executable) is not needed.. Just the word 'perl' followed by your flags.
Hope this helps save some time.