in reply to how can I print my hash values once?
If the lines are truly duplicates, and you don't care about the ordering, then I think I'd leverage the sort utility to remove duplicates and just open[1] the file with:
open(my $in, '-|', "sort -u /Users/mydir/Desktop/CCDS.current.txt") or + die " Can't open file: $!";
Then your code can be considerably shorter/simpler.
Note: [1] From my reading, I think this is how to use an input pipe with the three-argument form of open, but I've not used it before.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|