Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Copying a hash to another hash problem

by Anonymous Monk
on Oct 23, 2002 at 08:22 UTC ( [id://207310]=note: print w/replies, xml ) Need Help??


in reply to Re: Copying a hash to another hash problem
in thread Copying a hash to another hash problem

I probably should have given more info to what I was attempting here.
Basically, I have 700+ disks in a NAS environment, contained in 47 drawers within 7 frames. I want to monitor the temp of the drawers, so my array would contain (1-7) for the frames and (1-8) for the no of drawers within the frames (as they don't all contain the same no. of drawers).
Giving as an example, (1,1) would be frame 1, drawer 1 would point to the value 30, or (5,8) would be frame 5, drawer 8 giving a value of 25.

The reason I was copying the array, was that the next time the prog queried the temp, I could compare the arrays and notify me of any changes in the temp from the last run.

Cheers

Sean

  • Comment on Re: Re: Copying a hash to another hash problem

Replies are listed 'Best First'.
Re^3: Copying a hash to another hash problem
by Anonymous Monk on Nov 22, 2019 at 07:12 UTC
    I realise it is 17 years later now, but for what it is worth now in 2019, you don't have to use a copy for this, only return a new reference / object in the acquisition function that queriers the data of your hard disks. So, don't use global hashes/arrays with this function. Then, two successive calls of the acquisition function will already return two separate instances of your data and so there is no need to copy this any further.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://207310]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-25 21:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found