Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Just to re-phrase what my fellow monks already pointed out, your problem is that you have two different $dev variable. When you use "my" in front of a variable, its scope becomes the current block. In the main program it's not a problem but in a while loop like you did, or any other kind of blocks, the variable will cease to exists at the end of said block, and will be recreated for each iteration, and it will never alter the content of the original variable defined outside of this block. In clear: remove the "my" besides your $dev variable inside your while loop because it creates a separate variable, not related to the one you think you are using. Good luck!
Testing never proves the absence of faults, it only shows their presence.
-- greengaroo
In reply to Re: how to debug an 'undef' that cannot be?
by greengaroo
|
|