usestrict;usewarnings;usePPI;=head1 NAMEdecomment - strip comments/pods from code=head1 SYNOPSIS decomment.pl <some.pl>=head1 SEE ALSOL<http://ja.doukaku.org/185/>PPI L<http://search.cpan.org/~adamk/PPI-1.203/lib/PPI.pm>=cutif(!$ARGV[0]){print"usage: $0 <some.pl>\n";exit0;}# test datamy$testdata="string with # :)";# this is a comment;# use PPI to strip comment from codemy$doc=PPI::Document->new($ARGV[0]);$doc->prune(q/PPI::Token::Pod/);$doc->prune(q/PPI::Token::Comment/);print$doc->content;__END__this section is not a comment.
turugina
#6555()
[
Perl
]
Rating0/0=0.00
see: PPI
Rating0/0=0.00-0+
[ reply ]