Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 1 ..2 ..3 ..4 .. is erix missing ;-)
LanX is Discipulus reciting "Springtime for Hitler" ?
[choroba]: erix could tell you how to do it in Postgres
[LanX]: NOOOOOOOOOOOOOOO not again
[chacham]: wow, mysql really is as bad as i thougt
[choroba]: completion?
[LanX]: That's what he usually does when MySQL is mentioned ;-)
[chacham]: the same thing could be achieved with a trigger
[LanX]: choroba yes
chacham shudders at the thought of using a trigger...so evil

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2017-03-30 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (360 votes). Check out past polls.