What is the exact meaning of the find2perl perl shebang + eval?
问题 What exacly do the following? #! /usr/bin/perl -w eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' if 0; #$running_under_some_shell the if 0 is never true, so the eval part will never executed, and the eval is strange too - what is the value of $0 in this context (inside single quotes?) Ps: taken from the result of the find2perl command 回答1: Best guess - as in this comment #$running_under_some_shell , it's to detect if the script is being run by some shell other than perl, e.g. bash. the if 0 is