Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

post bits of code you like

Name: Anonymous 2005-08-02 1:52

i shall start:

open(F,"find -type f|");
while (<F>) {
 $_ = substr($_,2,-1);
 print "$_\n" if $v;
 push @{$dups{substr(`md5sum -b "$_"`,0,31)}}, $_;
}
close(F);

for every file in a directory it checksums the file, then adds the checksum as a key to a hash, the value being an array reference. the filename is then added to the array.

so basically the arrays have a list of files with the same checksum. i use this to find duplicates files.

Name: Anonymous 2006-04-25 10:21

>>165
I can't, but Guido Van Rossum can :P .

>>167
PHP sucks more than Perl.
I disagree. In functionality, surely, but not in syntax, and I'll take "ugly function names/params" over "completely unreadable and designed by a 12 year old". Sometimes I know what Perl will do but I really don't have a clue how is the parser able to tell. And this uncertainty is pretty uncomfortable and prone to errors. I'd tell the guys who designed Perl (if it was ever designed) to fucking grow up.

I'd never use it for sysadmin tasks or text munging
Of course, I don't like it much for that either, that's where I like PHP.

The "pythonic way" is for fags.
I use the Anonymousic way; I do it the way it pleases Anonymous, regardless of language.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List