#!/usr/bin/perl use strict; use warnings; my $string = "ABC0000K0000T12345"; $string =~ s/0000([J-U])/my $x=ord(uc($1))-ord('I');('0'x(4-length($x) +)).'-'.$x/ige; print $string, "\n";
In reply to Re^3: Easy find and replace loop. HELP!
by Transient
in thread Find and replace by five character string
by wrml
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |