Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^3: rename duplicate data

by monsoon (Pilgrim)
on Jun 22, 2012 at 15:01 UTC ( #977857=note: print w/ replies, xml ) Need Help??

in reply to Re^2: rename duplicate data
in thread rename duplicate data

It would help if your code was properly formatted. Anyway, to use 'say' you need to

use v5.10;

for "my $debug" declaration you probably meant

my $debug = $ARGV[1];

'ids' need to be declared as a hash, not a scalar

my %ids;

while loop needs to read from the file handle that you opened instead of checking the truth value of $filename variable which causes infinite loop if $filename is anything other than 0 or empty string


'print say' at the end doesn't really do any good

Comment on Re^3: rename duplicate data
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2015-08-02 19:29 GMT
Find Nodes?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...

    Results (10 votes), past polls