Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: using external file for hashes

by frozenwithjoy (Priest)
on Jun 04, 2013 at 18:17 UTC ( #1037027=note: print w/replies, xml ) Need Help??

in reply to using external file for hashes

One suggestion: Since your hash keys are just 0-based indices, why not make them arrays?

$Real_time{0} == $Real_time[0] == 'No'

Replies are listed 'Best First'.
Re^2: using external file for hashes
by r0adawg (Beadle) on Jun 04, 2013 at 18:26 UTC
    some of the hashes are not zero based. I'm working with a legacy program.

      I see. How about using Data::Dumper to make a file of your hashes? Then read this file in (split each structure based on some delimiter you add during the write process and rebuild hashes w/ eval like described in the answers to Read the Dumper data back to a hash.
        Check also Unexpected Data::Dumper results if your hashes contain references that might point to the same thing.
        لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1037027]
[marto]: you make up these questions yourself, or do they write 'em down for you?
[choroba]: Can humans count?
[oiskuu]: She Showers at YMCA?
[Your Mother]: marto++
[oiskuu]: marto, that doesn't discriminate. A human would take that as a challenge.
LanX writing a book about YM - "Lord of the Noseeums"

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (12)
As of 2017-12-18 14:46 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (487 votes). Check out past polls.