NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
a safer one-liner (Score:1)
A more safe one-liner that works even on win32 platforms.
perl -e "$_ = <> until
Reply to This
Re: (Score:1)
Great work, masak. I started using that in Padre::Plugin::Perl6 to index Perl6 functions.
Happy to hear that.
A more safe one-liner that works even on win32 platforms.
perl -e "$_ = <> until /Function Packages/; while (<>) { if (/^=(\S+) (.*)/) { next if $1 eq q{over}; print q{ } x 4 if $1 eq q{item}; print qq{$2\n} } }" S29-functions.pod
That version may work on win32 platforms, but it doesn't in bash, which does variable interpolation of double-quoted strings. Single quotes work.
Thanks for the tip about
q{}andqq{}, though! I really should remember to use those more in one-liners, where single quotes are essentially hijacked by the-estring.Re: (Score:1)
Please take a look at the updated code for parsing S29 for documentation and selecting the correct one. I think S29 needs to be updated in some =item-s to be more consistent.
http://padre.perlide.org/browser/trunk/Padre-Plugin-Perl6/lib/Pa