Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Compare two file text input, compare it, replace and write new file

by repellent (Priest)
on Feb 14, 2012 at 06:29 UTC ( [id://953628]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @words = split / /, $s;
    
  2. or download this
    # match a backslash followed by two characters,
    #   then compute the replacement by looking into %words
    $s =~ s{(\\..)}{ $words{$1} || $1 }ge;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-03-28 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found