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

Shebang line (perl script) running on both UNIX and Windows

P: 1
I have a perl script to run on both UNIX and Windows. How should I write the Shabang line:

On UNIX, it is
#!/usr/bin/perl
On Windows, it is
#!C:\perl\bin\perl.exe

Which one should I use?
Should I combine them?
If yes, how?

Thanks,
dxz
Mar 20 '08 #1
Share this Question
Share on Google+
1 Reply


KevinADC
Expert 2.5K+
P: 4,059
windows ignores the shebang line, but if you plan on writing CGI scripts the http server may need to read the shebang line. If you are not writing CGI scripts just use the Unix shebang line and windows will ignore it. If you are writing CGI scripts then you will need to change the shebang line or inform the end-user it will need to be changed.
Mar 20 '08 #2

Post your reply

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