Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Simple replacement - only if they exist..

by PrakashK (Pilgrim)
on Apr 11, 2002 at 17:46 UTC ( #158370=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    %rs = (
        vdd  => 'P',
    ...
        vssa => 'G',
        vss  => 'G',
    );
    
  2. or download this
    $line = "*.PIN foo:I bar:O vdd:I vssq:I vssa:O";
    $line =~ s/\b(\w+):([A-Z])\b/$rs{$1} ? "$1:$rs{$1}" : "$1:$2"/eg;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://158370]
help
Chatterbox?
[LanX]: of course not
[LanX]: it's pretty ironic if you know the character
choroba likes the movie
[choroba]: Lady_Aleena Do you really need to say "WorldBuilder" after having said "WorldBuilding"?
[LanX]: have to watch it again :)
[Lady_Aleena]: choroba, the tables in that group of modules is from the World Builder's Guidebook, so I thought it best to add the name of the book to the name of the module.
[choroba]: oh, I see

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2017-05-24 22:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?