Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Find Duplicate Files

by merlyn (Sage)
on Jan 04, 2001 at 23:48 UTC ( [id://49841]=note: print w/replies, xml ) Need Help??


in reply to Find Duplicate Files

I don't like the package %files there. You can get rid of it by passing a closure to File::Find...
sub find_duplicate_files { my %dupes; my %files; find sub { -f && push @{$files{(stat(_))[7]}}, $File::Find::name; }, shift || "."; .... }
Much cleaner. Easier to maintain. Smaller locality of reference. Blah blah blah. {grin}

-- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://49841]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-23 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found