Not being an expert in pattern-matching, I've been struggling with this for a while and I think there's a simple solution. I want to substitute a letter A-J for any number 0-9 which appears as the first character in a string.
For example:
3STRING would become CSTRING
ASTRING would not be changed.
I've been trying variations of:
$string =~ tr/^[0-9]/[A-J]/;
...using tr, s, etc.
Start Free Trial