rick has asked for the wisdom of the Perl Monks concerning the following question:
foreach (split(m!</Genesis:File>!si, $template)) { next unless (m!<Genesis:File name=\"(.*?)\">(.*)!si); my ($file) = ($1); # print "\t" x 3, '<li>'; if (-e $file) { # print qq!<a href="$STATE{'web_path'}$file">$file</a> +- $str[152]!; } elsif ($file =~ m!\%!) { # print "$file - $str[151]"; } else { print $file; } # print "</li>\n"; } print "\t\t</ul>\n"; last Err; } return $err; }
foreach (split(m!</Genesis:File>!si, $text)) { next unless (m!<Genesis:File name=\"(.*?)\">(.*)!si); my ($file, $text) = ($1, $2); # strip leading and trailing vertical whitespace $text =~ s!^(\015|\012)*!!s; $text =~ s!(\015|\012)*$!!s; my $is_cgi = 0; ($temp_err_msg, $is_cgi) = &CheckName( $file,1 ); if ($temp_err_msg) { push(@temp_errors, $temp_err_msg); next; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: passing user form input value to %placeholder%
by Tanktalus (Canon) on Apr 25, 2006 at 00:58 UTC | |
by rick (Novice) on Apr 25, 2006 at 16:53 UTC |