Chat on IRC |
Perl hashes
Posted by grandsnafu [send private reply] at September 13, 2001, 10:36:54 PM
Is there any way to store a function type thing in a perl hash? for example:
%lengths = qw(month length($m)); Calling $length("month") just returns the string "length($m)", which isn't very helpful. Any ideas?
Posted by taubz [send private reply] at September 14, 2001, 10:06:12 AM
I'm not sure what you're trying to do.... but maybe using the eval command and writing your own subroutine (or maybe a module, which I know nothing about) would work.
- taubz
Posted by grandsnafu [send private reply] at September 14, 2001, 10:33:08 PM
yeah, i'll try using eval. thanks
Register as a new user | |||||