in reply to Automatically Rewrite Shebang Line on Multiple Files

Non Perl solution; tested on linux; I think this should be usable in cygwin as well:

 find . -iname "*.pl" -o -iname "*.cgi"  | xargs sed -i.bac -e '1s"^#!.\+$"#! /usr/bin/perl"'

Udate