What should I use for a Perl script's shebang line?

后端 未结 8 1843
北荒
北荒 2020-12-02 22:19

Which of these is better or faster to use as the shebang line for a Perl script?

#! perl

#! perl.exe

#! fullpath/perl(/perl.exe)

#! partialpath/perl(/perl         


        
相关标签:
8条回答
  • 2020-12-02 22:49

    If you're developing in Unix using Perl and you use "perlbrew" to easily switch between different versions of Perl, then the "#!/usr/bin/env perl" shebang line works well.

    I originally had the first 2 characters in the shebang line reversed. Just fixed/edited that.

    0 讨论(0)
  • 2020-12-02 22:53

    If you are running CGI via Apache on Windows, the SHEBANG IS USED. You will need the fullpath to perl.

    0 讨论(0)
提交回复
热议问题