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...: Create a hash from a string: Edit Log



hujirong
Novice

Jun 25, 2015, 8:47 AM


Views: 10653
Create a hash from a string

# Hash my %weekly_temperature = ('monday', 65, 'tuesday', 68, 'wednesday', 71, 'thursday', 53, 'friday', 60);

Using the above sample, I now have a string can be formatted like this:
"'monday', 65, 'tuesday', 68, 'wednesday', 71, 'thursday', 53, 'friday', 60". How can I create a hashfrom this string? or I can format the string in whatever way it takes. It's transferred from another system.

Thanks
Jirong


(This post was edited by hujirong on Jun 25, 2015, 8:48 AM)


Edit Log:
Post edited by hujirong (Novice) on Jun 25, 2015, 8:48 AM


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

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