perl/psql question

G. Matthew Rice matt-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org
Wed Nov 10 02:33:00 UTC 2004


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].
-- 
g. matthew rice <matt-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org>         starnix, thornhill, ontario, ca
phone: 647.722.5301 x242                                  gpg id: EF9AAD20
http://www.starnix.com              professional linux services & products
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list