Stories
Slash Boxes
Comments
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

use Perl Log In

Log In

[ Create a new account ]

cfedde (8355)

cfedde
  (email not shown publicly)
+ -

  Journal: Tricks for .profile on 2009.07.07 21:30

Journal by cfedde on 2009.07.07 21:30
User Journal
# Add manual directories to to your MANPATH environment
MANPATH=$MANPATH:`perl -le 'print join ":",grep{s/bin$/man/&&-d} split /:/,$ENV{PATH}'`
Read More 1 comments
Comments: 1
+ -

  Journal: A couple shell functions on 2009.07.02 14:02

Journal by cfedde on 2009.07.02 14:02
User Journal
google () {
    u=`perl -MURI::Escape -wle 'print "http://google.com/search?q=".
    uri_escape(join " ",  @ARGV)' $@`
    w3m -no-mouse -F $u
}

scpan () {
    u=`perl -MURI::Escape -wle 'print "http://search.cpan.org/search?query=".
        uri_escape(join " ",  @ARGV) ."&mode=module&n=100"' $@`
Read More 0 comments

+ -

  Journal: Generate a list of candidate DNS domains on 2009.07.01 10:42

Journal by cfedde on 2009.07.01 10:42
User Journal
wget http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains &&
perl -MIO::All -le '
my @x;
BEGIN{@x = io("/usr/share/dict/words")->chomp->slurp}
while (<>) {
    /title="\.([^"\s+]+)/ or next;
    $re = qr/${1}$/;
    print for (grep {s/($re)/.$1/} @x)
}
' List_of_Internet_top-level_domains
Read More 0 comments