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

Re: Trying to remove duplicate rows using hashes

by jettero (Monsignor)
on Oct 21, 2008 at 15:45 UTC ( [id://718518]=note: print w/replies, xml ) Need Help??


in reply to Trying to remove duplicate rows using hashes

Offtopic, sorry, I'm sure an actual answer will be along very shotly.

You don't really use any of these ... Why load them?

use English; use FileHandle; use Exception;

Oh, I have an actual answer I guess. It seems you're stomping on your $k2 with your second each() call...

-Paul

Replies are listed 'Best First'.
Re^2: Trying to remove duplicate rows using hashes
by Angharad (Pilgrim) on Oct 21, 2008 at 15:47 UTC
    oh - well i guess I just cut and paste those from other scripts - but yes in this instance i guess they are rather redundant. EDIT: what do you mean by the "stomping"?
      EDIT: what do you mean by the "stomping"?

      I'm sure others have already answers this...

      I mean that your second each call is overwriting your $k2 value so your next call to each is operating on the value you replace $k2 with instead of the hashref you mean to have there.

      Stomping is a colloquial expression, by which I mean to stay "accidentally replacing" or "stepping on."

      -Paul

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-26 00:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found