in reply to Automating SPROC execution

Well you don't need a perl script for that...
perl -pi -e 's/ALTER SPROC/CREATE SPROC/g' *.sql