perl/psql question
Scott Elcomb
Scott.Elcomb-iRg7kjdsKiH3fQ9qLvQP4Q at public.gmane.org
Wed Nov 10 06:45:09 UTC 2004
On Tue, 2004-11-09 at 21:33, G. Matthew Rice wrote:
> Madison Kelly <linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org> writes:
> > I want to load a lot of data from a database into variables in a perl
> > script. The trick is I want the the value in one field to be the string
> > name and the value in another field to be the value of the string. Is
> > there any way to do this by chance? As I see it so far I will have to call
> > each variable/value pair one at a time... There must be a better way!
> > Thanks!
>
> The DBI module has functions for returning a select statement as a hash [key
> and value pairs].
The perlfaq7 manpage has a good section on using variables to store
variable names.
use perl;
--
PGP Public Key:
1024D/98125E76 2004-03-21 Scott Elcomb (dL33T) <Scott.Elcomb-iRg7kjdsKiH3fQ9qLvQP4Q at public.gmane.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gtalug.org/pipermail/legacy/attachments/20041110/02fe1016/attachment.sig>
More information about the Legacy
mailing list