in reply to changing file extensions
perl -we '/(.*)\./&&rename"$1.foo","$1.bar"for<*.foo>' [download]
Hope this helps,,,
Aziz,,,