I was hoping that because I'm using in-line modification from the command line, that it could somehow be a 1-liner
REM Windows CMD prompt perl -F: -e "$F[0] =~ s/-/_/g; print join(':',@F);"
# Linux/Unix/Cygwin shell perl -F: -e '$F[0] =~ s/-/_/g; print join(":",@F);'
Disclaimer: Not tested.
Explanation: -F: turns on auto-split (-a) and auto-loop (-n) and sets the split character to ':'
In reply to Re^3: Repeated substitution on 1 side of a line only
by RonW
in thread Repeated substitution on 1 side of a line only
by dspivey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |