3

perldoc perlrun contains this example:

 #!/bin/sh
 #! -*-perl-*-
 eval 'exec perl -x -wS $0 ${1+"$@"}'
     if 0;

But I don't understand why it might be needed.


For example, if my perl interpreter has been installed in /home/user/folder/../../.. and I use such a construct — will my script work?

Vlastimil Burián
  • 27,586
  • 56
  • 179
  • 309
69 420 1970
  • 375
  • 3
  • 17

0 Answers0