[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[FWP] more japh golf



Steve Lane wrote:

>           perl -le '$_=`man perlfaq1`;print/"(.*)" s/'
> 
> is not capitalized, and is w/o comma, but it's close (i guess).


You can run a match on a constant; it doesn't get modified, so
the named temporay variable is not required


            perl -le'print`man perlfaq1`=~/"(.*)" s/'

If we're relying on having a working man command, why not go
with piping, for 

            man perlfaq1|perl -lp0e'($_)=/"(.*)" s/'



-- 
                          David Nicol 816.235.1187 nicold@umkc.edu
                            You discover uranium! collect $240,000

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe