Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Directory tree explorer with stats reporting

by Scott7477 (Chaplain)
on Mar 10, 2006 at 14:24 UTC ( [id://535708]=note: print w/replies, xml ) Need Help??


in reply to Directory tree explorer with stats reporting

I ran this code on my C: drive on a Windows XP system using ActiveState 5.8.7 build 813. I got a bunch of
error lines as follows "Use of uninitialized value in adddition <+> at 535607.pl line 96". I haven't had
time to dig through your code, but this functionality would be useful to me. Hope this helps..

Scott
  • Comment on Re: Directory tree explorer with stats reporting

Replies are listed 'Best First'.
Re^2: Directory tree explorer with stats reporting
by kutsu (Priest) on Mar 10, 2006 at 15:37 UTC

    Did you copy the code from the download link? (which sets it as text so you don't get the extra +'s that specify a wrapped line)?

      I doublechecked that and that wasn't the problem. Then I ran it and it worked fine...no errors at all.
      Who knows? User error, most likely:)
      A handy utility anyhow.

      Thanks,

      Scott
        Another reason could be that the program encountered an ephemeral file which was gone by the time program checks for its size (thus causing addition of undef, resulting in error message).
Re^2: Directory tree explorer with stats reporting
by parv (Parson) on Mar 11, 2006 at 00:36 UTC

    Seems like you encountered a state where the path length may be more than the program (underlying -s function) could handle. I can easily reproduce it by creating a circular symbolic link on FreeBSD. After 32|33 levels, size is undef, resulting in Use of uninitialized value in adddition <+> ... message.

    I will post the updated program -- unless somebody beats me to it -- to not follow symbolic links.

    Update (later that day): Problem that i observed was due to circular symbolic links (unresolved till 3[23] levels); there was no problem w/ 60+ levels of directories.

      Ouch! Thanks for that work parv and I'd appreciate the update posted.


      DWIM is Perl's answer to Gödel
        Not to pat myself on the back, but rather to point out the value of even simple testing:

        Someone downvoted my original post in this thread; probably because they didn't like the fact that I mentioned that I hadn't had time to dig into the code myself. Or perhaps because they thought I had done what GrandFather initially suggested was the problem: i.e. just copy pasted the code instead of downloading it.

        The subsequent posts to this thread demonstrate that my initial post had value: [id://parv] looked at this(and what the other posters had to say), found the bug and fixed it.

        The poing: even simple testing is worthwhile if you provide some detail for others to work with.
        Maybe I'm way off base here..but I think not...:)

        By the way..thanks for the fix, [id://parv]

        Scott

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-25 12:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found