Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: sorting a hash that's in another file

by tedrek (Pilgrim)
on Jul 23, 2003 at 21:38 UTC ( #277353=note: print w/replies, xml ) Need Help??


in reply to sorting a hash that's in another file

Is there some reason you can't just copy the hash into your script manually, it appears to be the sort of data that is relatively static. Alternatively if you have access to the module that declares the hash is there some reason that you can't rewrite it to get that hash from a third module? eg. in both scripts:

use States; my %some_hash = %States::some_hash;

Replies are listed 'Best First'.
Re: Re: sorting a hash that's in another file
by alienhuman (Pilgrim) on Jul 24, 2003 at 14:44 UTC

    Tedrek,

    There is a reason: the file is frequently updated by other developers. Those developers are only concerned with adding items to each of the hashes within %some_hash. In other words, they are concerned with adding more birds to MASSACHUSETTS (quite a bunch of pro-environment developers here ;-) ). However, it is useful (IMHO) for us to be able to see which birds are associated with which states (names of keys/values have been changed to protect the innocent--the "birds" are actually user IDs and the "states" are various functions... long story).

    However, your idea to put the values in a separate module is excellent, and I will likely do just that (see my above reply).

    Cheers,

    AH

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2021-09-19 14:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?