perloneliner
-
primitive grep -C replacement -e '($c,$p,@)=@;@=<>;print$/,@[$_-$c..$c+$_] for grep $l[$_]=~/$p/,0..$#l' 2 bash /etc/passwd
12:25 PM Nov 12th
from Echofon
-
-0777 rockz
11:26 AM Nov 10th
from Echofon
-
I just helped a colleague to escape some javascript for later use in post requests: cat invx.js| -MURI::Escape -pe '$_=uri_escape($_)'
8:34 AM Nov 8th
from Echofon
-
-e 'print "daylight saving ", (localtime)[8] ? "active" : "inactive"'
9:56 PM Oct 25th
from Echofon
-
phonetic grepping -MText::Metaphone -ne 'print if Metaphone("beer") eq Metaphone($_)' /usr/share/dict/words
2:17 PM Oct 22nd
from Echofon
-
lynx -dump equivalent GET twitter.com | perl -MHTML::FormatText::WithLinks -0777ne 'print HTML::FormatText::WithLinks->new->parse($_)'
11:43 PM Oct 9th
from Echofon
-
fortune | perl -MAcme::LOLCAT -0777ne 'print translate $_'
11:10 AM Oct 8th
from Echofon
-
5.11 is out finally some mess gets cleaned up perl5.11.0 -we '$[=4711'
11:42 PM Oct 4th
from Echofon
-
-MProc::Killall -e 'killall "TERM", "xterm"'
8:38 AM Oct 1st
from Echofon
-
perl -MDevel::Symdump -E 'say for Devel::Symdump->new("Devel::Symdump")->functions'
11:05 PM Sep 24th
from Echofon
-
lots of useful tools e.g.corelist Data::Dumper
11:23 PM Sep 22nd
from Echofon
-
just another obfu $ echo -e 'use Acme::Enc;\nprint "hello world"' > enc.pl;perl enc.pl; perl enc.pl
2:20 PM Sep 21st
from Echofon
-
autobox too cumbersome -Mautobox::Core -MMP3::Tag -e'[glob"*.mp3"]->map(sub{[MP3::Tag->new($_)->autoinfo]})->map(sub{"@$_\n"})->say'
11:21 PM Sep 19th
from Echofon
-
golfed OO, use poping constructors -e 'package P;sub new{bless pop}; P->new({foo=>bar})'
12:28 PM Sep 19th
from Echofon
-
merge hashes easily#perl -MData::Dump=dd -MHash::Merge=merge -e 'dd %{ merge({mascot=>penguin,foo=>bar}, {mascot=>llama,john=>doe})}'
10:59 PM Sep 15th
from Echofon
-
tomcat garbagecollect#perl -MJMX::Jmx4Perl -e'JMX::Jmx4Perl->new(url,"http://localhost:8080/j4p")->execute("java.lang:type=Memory","gc")'
2:03 PM Sep 15th
from Echofon
-
list all mbeans -MData::Dump=dd -MJMX::Jmx4Perl -e'dd(JMX::Jmx4Perl->new(url=>"http://localhost:8080/j4p")->list)'
1:02 PM Sep 14th
from Echofon
-
-MJMX::Jmx4Perl -E'use JMX::Jmx4Perl::Alias;say JMX::Jmx4Perl->new(url=>"http://localhost:8080/j4p")->get_attribute(MEMORY_HEAP_USED)'
11:03 PM Sep 13th
from Echofon
-
SUPER's twin module#perl -MNEXT -E 'package A;sub f{say "world"};package B;@=qw(A);sub f{say "hello";shift->NEXT::f};(bless{},"B")->f'
9:20 AM Sep 12th
from Echofon
-
easy perl ssh interface # perl -MNet::OpenSSH -e 'Net::OpenSSH->new("127.0.0.1")->system("ls /tmp")'
12:18 AM Sep 12th
from Echofon
|
- Name perloneliner
- Location "$^X land"
- Web http://twitter.co...
- Bio WARNING: You need to have a basic understanding of perl. 140 chars might not cover sensible safety features. Not for blindly use in production.
|