Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This reminds me of an old Perl magic spell for invoking it within a Bourne/POSIX shell wrapper along with allowing arbitrary command line arguments[0]:

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

  # It's Perl code from this point.
0 - https://perldoc.perl.org/perlrun


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: