http://www.perlmonks.org?node_id=869374


in reply to regex problem

Try this.
#!/usr/bin/perl use strict; use warnings; use 5.010; while (<DATA>){ my ($name,$num,$addr,$date,$n) = split(/:/, $_); $name ~~ s/William Kopf/Siegfield/ig; print "$_"; }