in reply to Hash arrays

Sure, provide some data in the form of perl variables, and I'll show you how to do it

Replies are listed 'Best First'.
Re^2: Hash arrays
by rkrish (Acolyte) on Dec 26, 2012 at 09:40 UTC
    Here is the code and variables:
    $stmnt = :"select acct_nbr,cycle_cd,cycle_end_dt from usage_rcvd" ; $sth = dbh->prepare($stmt); while ($sth->fetch()) { bind_col(1,$acct_nbr); bind_col(2,$cyc_cd); bind_col(3,$cyc_end); here I need to store them in hash array: key is $acct_nbr values are $cyc_cd and $cyc_end }

      Doesn't look very much like valid perl, sorry, all I can suggest for you is perlintro

        I'm yet to prepare,that is just code snippet to make you understand what i need to do:
        $stmnt = :"select acct_nbr,cycle_cd,cycle_end_dt from usage_rcvd" ; $sth = dbh->prepare($stmt); while ($sth->fetch()) { $sth->bind_col(1,$acct_nbr); $sth->bind_col(2,$cyc_cd); $sth->bind_col(3,$cyc_end); here I need to store them in hash array: key is $acct_nbr values are $cyc_cd and $cyc_end }