Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

while(<IN>)

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


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (15)
As of 2015-07-07 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (89 votes), past polls