open (TEMPLATE, "<$template_file") or die "Can't open $template_file: +$!"; $template = do { local $/; <TEMPLATE> }; close TEMPLATE; opendir (BIN, "$prod_dir") or die "Can't open $dir: $!"; while (defined ($file = readdir BIN)) { next if ($file =~/^\.\.?$/); #skip file starting with periods open (DESCR, "<$prod_dir/$file") or die "could not open $dir/$file +: $!"; $description = do { local $/; <DESCR> }; $template =~ s/%%DESCRIPTION%%/$description/; open (OUTPUT, ">$output_directory/$file.html"); print OUTPUT $template; close OUTPUT; next; } closedir (BIN);
In reply to Regex reset problem? by sz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |