Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open IN, "<in.txt" or die $!;
- open OUT, ">out.txt" or die $!;
- print OUT "<html><body>";
- while (<IN>)
- {
- chomp;
- s|^\s+|<p>|;
- s|\*([^*]+)\*|<b>$1</b>|g;
- s|(http:/\S+)|<a href="$1">$1</a>|g;
- print OUT;
- print OUT "<br>\n";
- }
- close IN;
- print OUT "</body></html>";
- close OUT;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement