perl -pi.bak -e 'BEGIN{$c=@ARGV};s[^#!/usr/local/bin/perl][#!/usr/bin/ +perl] && $c-- if $c> @ARGV' *.pl