Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 scrutinizing the Monastery: (6)
As of 2014-07-24 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (156 votes), past polls