in reply to Re: List EXE_FILES installed by CPAN
in thread List EXE_FILES installed by CPAN
Well /bin shows everything but this is just for CPAN executables. Anyway my original post was broken and was hiding about 60 programs from me! I also learned that unformatted code is very unpopular around here (outside obfu :-). This seems to work locally, let me know if you have any problems, or make improvements:
List EXE_FILES installed by CPAN:
List EXE_FILES installed by CPAN:
List EXE_FILES installed by CPAN, by module:#!/usr/bin/perl -l use strict; use warnings; # List EXE_FILES installed by CPAN $_ = join '', `perldoc -uT perllocal`; @_ = (/EXE_FILES:\s([^>]+)/sg); my @z = (); for (@_) { my @x = split /\s+/; s/^\S+\/// for @x; push @z, @x; } %_ = map { $_ => 1 } @z; print $_ for sort keys %_; #print scalar keys %_;
#!/usr/bin/perl -l use strict; use warnings; # List EXE_FILES installed by CPAN, by module $_ = join '', `perldoc -uT perllocal`; my @m = (/=head2.*?\|([^>]+)/g); my @e = (/EXE_FILES:\s([^>]*)/sg); for (my $c = 0; $c < scalar @m; $c++) { $_{$m[$c]} = $e[$c] } my @z = (); my $n = 0; for (sort { lc($a) cmp lc($b) } keys %_) { if (my @x = split /\s+/, $_{$_}) { print; $n += scalar @x; s/^\S+\/// for @x; print " $_" for @x; print ""; } } #print $n;
STOP REINVENTING WHEELS, START BUILDING SPACE ROCKETS!—CPAN 🐪
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: List EXE_FILES installed by CPAN (FIXED!)
by choroba (Cardinal) on Jun 25, 2018 at 00:29 UTC | |
by usemodperl (Beadle) on Jun 25, 2018 at 02:33 UTC |
In Section
Cool Uses for Perl