http://qs1969.pair.com?node_id=1217397


in reply to Re^2: List EXE_FILES installed by CPAN
in thread List EXE_FILES installed by CPAN

Feel free to golf my code.

Ok.

perl -MList::Util=uniq -le "$,=$/; print sort( uniq( qx(perldoc -uT pe +rllocal) =~ m(<EXE_FILES: (?:.*/)?(.*)>)g) );"

Note, I'm not actually a golfer. This is just my idea of concise code.

I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.

Replies are listed 'Best First'.
Re^4: List EXE_FILES installed by CPAN
by usemodperl (Beadle) on Jun 25, 2018 at 21:53 UTC
    That's so dope, but it's incomplete. You forgot to split out lines with multiple records. I tried to extend your idioms up front but ended up post processing:

    perl -MList::Util=uniq -le "$,=$/; @_= uniq( qx(perldoc -uT perllocal) + =~ m(<EXE_FILES: (?:.*/)?(.*)>)g); for (@_) { @x = split/\s+/; push +@z, @x} print sort @z"
    STOP REINVENTING WHEELS, START BUILDING SPACE ROCKETS!CPAN 🐪