Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Populating an HTML Template

by InfiniteSilence (Curate)
on Mar 28, 2006 at 00:35 UTC ( [id://539593]=note: print w/replies, xml ) Need Help??


in reply to Populating an HTML Template

On a related note, I cannot believe that you really want to create temporary files every time this is called. BTW, TMTOWTDI:
local $/; open(IN,qq|adatafile.txt|) or die $!; my $infile = <IN>; my $begin_stuff; my $end_stuff; my %mid_stuff; close(IN); if($infile=~m/(.*)\#\s+__START_CONFIG__/s){ $begin_stuff = $1; } if($infile=~m/__START_CONFIG__(.*)\# __END_CONFIG__/s){ my $tmp = $1; while($tmp=~m/([^=\s]+)=([^=]+)\n/g){ $mid_stuff{$1} = $2; } } #if ..oh hell, you get the bloody idea... print Dumper \%mid_stuff;

Celebrate Intellectual Diversity

Log In?
Username:
Password:

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

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

    No recent polls found