perl -p -i.bak -e "s/^-//g" foo.dat
Update: Forgot that you wanted to uppercase stuff:
perl -p -i.bak -e "s/^-(.*)/uc($1)/e" foo.dat
Update #2: You might also try Mastering Regular Expressions
Celebrate Intellectual Diversity
In reply to Re: Text manipulation with perl
by InfiniteSilence
in thread Text manipulation with perl
by jriggs420
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |