-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 3:55 PM -0500 5/10/01, jason n perkins wrote:
>hash). extract takes the key values of the array (and optionally prepends a
>user specified prefix to each of the values to avoid clobbering other values
>in the symbol table), sets each of them up as a variable with that name and
>sets the variable's value equal to the value of that associated key in the
>hash. the beauty of extract comes into play when you want to use each of the

This isn't going to gain you much.  It's the difference between:
        [+ $fdat{foo} +]
and
        [+ $foo +]

You could pretty easily write something like:
        foreach $key (keys %fdat) {
                eval("\$$key = '$fdat{$key}'")
...

That won't work as written, and of course you need to check for 
illegal variable names, reserved variables, characters that have to 
be escaped and the like.  And while you're at it you might want to 
change tab-seperated variables into arrays.  Embperl's hash is a bit 
more flexible because it doesn't have any of those restrictions, you 
just have to type 7 extra characters.

P.S. You'd probably also want to make %fdat contain references to the 
variables or vice versa, so that changing one would change the other. 
Otherwise you'll lose a lot of the magic of %fdat.
- -- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBOvsG5CZsPfdw+r2CEQLrJQCguJFmDe5mGbeu475V6n6WJnZKfdgAoIF1
9iF7G/ASs0bSpnX5PrhIfuUI
=TEqt
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to