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

Re: Substitution in text files

by Weasel (Sexton)
on Jun 15, 2002 at 20:19 UTC ( [id://174874]=note: print w/replies, xml ) Need Help??


in reply to Substitution in text files

you need not
$message =~ s/\$subKey/$subVar/o;
but rather
my $qkey = quotemeta $key; $message =~ s/$qkey/$recorsData{$key}/;
but your code snippet and your question gives me an idea that you're completely lost. Where's reading of a file after local($/)=undef;? (which is easier to write as just local $/;) where's file writing?

To say, to answer a question you should know 50% of answer...

Give us more details and your problem will be easier to advice...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-04-24 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found