in reply to foreach type of deal?

You can do this on the command line with in-place editing.

johngg@shiraz:~/perl/Monks > cat > gtype.txt goat grate grip johngg@shiraz:~/perl/Monks > ls gtype* gtype.txt johngg@shiraz:~/perl/Monks > perl -pi.BAK -e 's{^g}{};' gtype.txt johngg@shiraz:~/perl/Monks > ls gtype* gtype.txt gtype.txt.BAK johngg@shiraz:~/perl/Monks > cat gtype.txt oat rate rip johngg@shiraz:~/perl/Monks > cat gtype.txt.BAK goat grate grip

I hope this is helpful.

Update: See "Command Switches" in perlrun for explanations of -e, -i and -p.

Cheers,

JohnGG