in reply to perl path: WinNT to Unix

To the best of my knowledge, the #! line on a Windows NT script does nothing. NT does not understand it, instead it uses file associations to know how to execute a script. You should be able to use #!/usr/bin/perl in the scripts on the NT side with no problem and be able to move them over to the Unix side of the house quite easily. We do something similar. We have both Unix and NT Perl scripts that are based on the same outline. All the scripts have the #!/usr/bin/perl line, regardless of which platform they are on and they run fine.

Replies are listed 'Best First'.
Re^2: perl path: WinNT to Unix
by ikegami (Patriarch) on Jan 03, 2005 at 18:44 UTC
    To the best of my knowledge, the #! line on a Windows NT script does nothing.

    That's not quite true. In Windows, perl checks the #! line for options. For example, #!/usr/bin/perl -w will turn on warnings. However, everything else you said applies because the path itself is not used. In other words, there's nothing wrong in putting #!/usr/bin/perl in the Windows versions of your scripts, because neither Windows nor perl uses that part of the #! line.

      Didn't know that part about the switches, thanks for the info.