Skip Menu |

This queue is for tickets about the File-Find-Duplicates CPAN distribution.

Report information
The Basics
Id: 23945
Status: rejected
Priority: 0/
Queue: File-Find-Duplicates

People
Owner: Nobody in particular
Requestors: rcchansl [...] us.ibm.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: problem
Date: Thu, 14 Dec 2006 15:21:04 -0700
To: bug-file-find-duplicates [...] rt.cpan.org
From: Robert C Chansler <rcchansl [...] us.ibm.com>
I am a fairly new perl programmer, so the issue may be mine. I coded a sample exactly like your synopsis and didnt get anything back. This is on a windows system. There about 20 duplicates in the dupes directory as I created it from the perlcode directory. Here is my code: #! /usr/bin/perl # pass 2 directory names in to compare use File::Find::Duplicates; my @dupes = find_duplicate_files("c:\perlcode", "c:\dupes"); print "dup 1 $dupes[0]\n"; foreach my $dupeset (@dupes){ printf "Files %s (of size %d) hash to %s\n"; join(", ", @{$dupeset->files}), $dupeset->size, $dupeset->md5; } I added the print command to see if there was anything in the array; there wasnt. The printf command also didnt execute. When I changed the double quotes to single quotes as in your example, I got the following output: dup 1 File::Find::Duplicates::Set=ARRAY(0x1964f98) Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to Files (of size 0) hash to What did I do wrong? Bob Chansler Sr IT Specialist IBM Printing Systems Professional Services - Boulder Phone:(303)924-6378
Subject: Re: [rt.cpan.org #23945] problem
Date: Fri, 15 Dec 2006 07:27:16 +0000
To: bug-File-Find-Duplicates [...] rt.cpan.org
From: Tony Bowden <tony [...] kasei.com>
Robert C Chansler via RT wrote: Show quoted text
> What did I do wrong? >
That's pretty hard for me to tell. However, I would suggest that you try dumping out the contents of @dupes to see what's in it: i.e. change Show quoted text
> my @dupes = find_duplicate_files("c:\perlcode", "c:\dupes"); > print "dup 1 $dupes[0]\n"; >
to: Show quoted text
> use Data::Dumper; > my @dupes = find_duplicate_files("c:\perlcode", "c:\dupes"); > print Dumper \@dupes;
Tony
Subject: Re: [rt.cpan.org #23945] problem
Date: Fri, 15 Dec 2006 08:57:50 -0700
To: bug-File-Find-Duplicates [...] rt.cpan.org
From: Robert C Chansler <rcchansl [...] us.ibm.com>
Download graycol.gif
image/gif 105b
graycol.gif
Download pic19137.gif
image/gif 1.2k
pic19137.gif
Download ecblank.gif
image/gif 45b
ecblank.gif
You can close this one. the error was a semicolon in the printf statement instead of a comma. Sorry for the trouble. Bob Chansler Sr IT Specialist IBM Printing Systems Professional Services - Boulder Phone:(303)924-6378 "Tony Bowden via RT" <bug-File-Find-Du To plicates@rt.cpan. Robert C Chansler/Boulder/IBM@IBMUS Show quoted text
org> cc
12/15/2006 12:27 Subject AM Re: [rt.cpan.org #23945] problem Please respond to bug-File-Find-Dup licates@rt.cpan.o rg <URL: http://rt.cpan.org/Ticket/Display.html?id=23945 > Robert C Chansler via RT wrote: Show quoted text
> What did I do wrong? >
That's pretty hard for me to tell. However, I would suggest that you try dumping out the contents of @dupes to see what's in it: i.e. change Show quoted text
> my @dupes = find_duplicate_files("c:\perlcode", "c:\dupes"); > print "dup 1 $dupes[0]\n"; >
to: Show quoted text
> use Data::Dumper; > my @dupes = find_duplicate_files("c:\perlcode", "c:\dupes"); > print Dumper \@dupes;
Tony