Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: contextual substitution with s///?

by toolic (Bishop)
on Feb 01, 2013 at 16:18 UTC ( #1016576=note: print w/ replies, xml ) Need Help??


in reply to contextual substitution with s///?

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 (>


Comment on Re: contextual substitution with s///?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016576]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (13)
As of 2015-07-03 12:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (53 votes), past polls