CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
Convert from String to Hash and loop it and Print it

 



nkishorech
New User

May 5, 2009, 1:40 PM

Post #1 of 1 (1377 views)
Convert from String to Hash and loop it and Print it Can't Post

I am getting the output as string in below format.First I need to convert to Hash and then loop throught it.

here is the code:

$ssmb_request = (
'request' => {
'acctno'=> 'XXXXXXX',
'prdtypcd'=> 'XXXXXXXX',
'sectyp' => 'XXXX'
},
'response' => {
'buypwr' => '361926.00',
'secdettbl' =>
{
'accttyp' => 'cash',
'accttyp_code' => '1',
'secdesc4' => '',
'secfmtflg' => '',
'secfmtflg_code' => '1'
} ,
},

);



How do u convert from String to HASH and loop throught it and print the all key and values in each level.



thanx in advance..

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives