Hi fellows, I have written a little script to update a bunch of HTML files. I know I could (maybe should) use a module such as HTML::Template, but my script worked fine until now.
Each site updated with the script has a root directory and a template, which are determined according to a meta tag (type) in the HTML files: [snip] if ($page =~ m#<meta\s+name="type"\s+content="([^"]*)" ?/?>#i) { $return_hash{type} = $1; } $site_root = '~/Sites/' . $site_type; $site_template = $site_root . '/templates/' . $site_type . '.tpl'; So, for the site 'janeden', I get the site root '~/Sites/janeden' and the template location/name '~/Sites/janeden/templates/janeden.tpl'. The $site_root is essential to determine the relative links on each HTML page. But now I had to change the layout and embed some sites. Their site roots and template location are now '~/Sites/janeden/whatever' and '~/Sites/janeden/whatever/templates/whatever.tpl' I temporarily fixed the resulting problem by adding another meta tag (parent), which contains the name of the embedding site. But there has to be a smarter solution. Can someone give me a hint? Thanks, Jan -- There are 10 kinds of people: those who understand binary, and those who don't -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>