Beth, That may all work but i need to modify my program to test it. Because I don't understand some of it the modification is going to be hard. Just a few questions: what is the line "node:" for? Is that where the "next node" directs? How does it test if something exists in $unique{$k} when there is nothing in there yet? Basically the whole for loop has me confused. I've actually started with a prior hash that has all the structure listed in the keys and the value as deleted when compared with the current hash which has keys as the structure but the values as created if when compared to prior it is a new structure. I fear my whole program is excessive long-winded babble. I've seen that i can use a library ChangeNotify to give live updates. But this script is only run every day or so to keep track of accidental changes. Any other ideas?
Thanks.# FIND CURRENT DIRECTORY STRUCTURE AND PRINT TO "CATALOG_CURRENT.TXT" sub myList { if ( -d ) { print CURRENT "$File::Find::name\n"; } } # GIVE "DELETED" VALUE TO KEYS IN "PRIOR" HASH THAT NO LONGER EXIST sub MarkNotExist { foreach $node (keys(%prior)) { ($prior{$node} = "deleted"), (++$change_count) if !exists $current{ +$node}; } } # GIVE "CREATED" VALUE TO KEYS IN "CURRENT" HASH THAT NOW EXIST sub MarkNewExist { foreach $node (keys(%current)) { ($current{$node} = "created"), (++$change_count) if !exists $prior{ +$node}; } }
In reply to Re^2: Comparing strings to reduce excess results
by grub_
in thread Comparing strings to reduce excess results
by grub_
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |