perl/script/MarkdownをHTMLに変換
提供: dsk's note
#!/usr/bin/perl use strict; use warnings; use lib '/home/dsktnk/local/lib/perl5'; use Text::Markdown qw/markdown/; use LWP::UserAgent; print qq|Content-type: text/html\n\n|; my $url="http://dsktnk.sakura.ne.jp/test.md"; my $ua = LWP::UserAgent->new; $ua->agent('Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)'); my $request = HTTP::Request->new('GET' , "$url"); my $response = $ua->request($request); my $data = $response->content; my $html = markdown($data); print $html;