perl -p -i.bak -e "s/^-(.*)/uc($1)/e" foo.dat