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.
use Perl
Search
use Perl
All the Perl that's Practical to Extract and Report
Navigation
FAQ
About
Submit Story
Older Stories
Topics
Polls
Journals
Authors
New Modules
Preferences
use Perl Log In
Log In
Nickname
Password
Public Terminal
[
Create a new account
]
cfedde (8355)
cfedde
(email not shown publicly)
Journal
of
cfedde
(8355)
Info
Journal
Firehose
Friends
Fans
Foes
Freaks
Tags
Bookmarks
Top 10
Friend's Journals
Tuesday July 07, 2009
09:30 PM
Tricks for .profile
[
1 Comment
|
#39250
]
# Add manual directories to to your MANPATH environment
MANPATH=$MANPATH:`perl -le 'print join ":",grep{s/bin$/man/&&-d} split
/:/,$ENV{PATH}'`
#
# uniqify PATH and MANPATH
#
PATH=`perl -le 'print join(":", grep {! $t{$_}++} split(/:/,$ENV{PATH}))'`
MANPATH=`perl -le 'print join(":", grep {! $t{$_}++} split(/:/,$ENV{MANPATH}))'`
Thursday July 02, 2009
02:02 PM
A couple shell functions
[
0 Comments
|
#39212
]
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"' $@`
w3m -no-mouse -F $u
}
Wednesday July 01, 2009
10:42 AM
Generate a list of candidate DNS domains
[
0 Comments
|
#39202
]
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
List all Journal entries
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
FAQ
About
Submit Story
Older Stories
Topics
Polls
Journals
Authors
New Modules
Preferences