Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

emilford's scratchpad

by emilford (Friar)
on Jun 05, 2004 at 11:33 UTC ( #361470=scratchpad: print w/replies, xml ) Need Help??

I submitted this question a few days back and got some responses, but I'm still getting what I need. If I have $command below, I need to swap all ${XYZ}'s in the string w/ their corresponding value in $dynamic_vars{xyz}. I broke this up into two steps, because I first need to make all XYZ's lowercase and then secondly swap ${XYZ} for $dynamic_variables{xyz}.
$command = 'Do this ${command} to ${computer}'; $command =~ s[ \$ { ([^}]+) } ] [ $ { \l$1 } ]; $command =~ [same as above][$dynamic_vars{$1}];
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2023-03-23 20:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?