Joshua Chamas wrote:

> 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
>
> %fdat = qw(var1 2 var2 4);
> map { eval qq(\$$_ = \$fdat{$_}) } keys %fdat;

map { eval qq(\$declobber$_ = \$fdat{$_}) } keys %fdat;

change declobber to something shorter.
if the correct name is chosen this will prevent clobbering of the symbol space.

still not as easy as using $fdat{KEY} in my opinion.  each language has its own merits.
use perl like perl and php like php.

--
___cliff [EMAIL PROTECTED]http://www.genwax.com/



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

Reply via email to