in reply to Re: regex vs split
in thread regex vs split

You're a C programmer, aren't you?
open(TEMPLATE, "template.html") or die $!; my $xtemplate = join '', <TEMPLATE>; close (TEMPLATE); # your markers my @markers = qw(TITLE STUFF); # your replacement values, arrayisized (ITS A WORD I TELL YOU!) my @replace = qw(meep narf); $xtemplate =~ s/\*{4}$markers[$_]\*{4}/$replace[$_]/g for (0 .. $#markers); # your formatted result print $xtemplate;

------
/me wants to be the brightest bulb in the chandelier!

Vote paco for President!