find ... -name '*.cgi' -type f \ -exec perl -pe's{^#!.*?/perl}{#!/.../perl} if $. == 1' -i~ {} \;