use warnings; use strict; $a="test string x x\nFeb 1 09:12:33 ("; if ($a =~ /^\w{3}\s\s\d/m) { # /^Feb 1/ $a =~ s/^(\w{3})\s\s(\d)/$1 $2/m; print "<$a>\n"; }else{ print "no match\n"; } __END__ <test string x x Feb 1 09:12:33 (>
In reply to Re: contextual substitution with s///?
by toolic
in thread contextual substitution with s///?
by Wiggins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |