#!/usr/bin/perl use Modern::Perl; # test the content submitted for preview -- for code and para tags $/="#####"; # will be followed by addtl samples -- good and bad my $nopara = 0; my $nocode = 0; my $preview = ; # print $preview; my @preview = split /\n/, $preview; for $_(@preview) { # say "\t Ln14, \$_: $_"; if ( $_ =~ /!

)/ ) { # arguably, this could be a s/// rather than a warning say "\n\t Bad tag -- "$1" -- found in \n \t $_\n"; } if ( $_ =~ /!<(c.*).*[;}] <\/c$1>/) { $nocode++; say "\n\t Do you need code tags in \n\t $_?\n?"; } } if ($nopara == 0 ) { print "\n\t You don't have any <p> paragraph tags </p> in your draft. Do you need some?\n"; } if ($nocode == 0 ) { print "\n\t You don't have a <c> code tag pair </c> in your draft. Is that correct?\n"; } print "\n\n @preview\n"; # imperfect, as a good
gets ignored, but perfectable __DATA__ I wantz to know if i can do this
my $foo = 'bar' if (bar == bar); cuz that would be really cool.
oh, also, would somebody teach me how to use your parlmenks markup? love, foobar ######## #### Bad tag -- "
" -- found in I wantz to know if i can do this
You don't have any <p> paragraph tags </p> in your draft. Do you need some? You don't have a <c> code tag pair </c> in your draft. Is that correct? I wantz to know if i can do this
my $foo = 'bar' if (bar == bar); cuz that would be really cool.
oh, also, would somebody teach me how to use your parlmenks markup? love, foobar #####