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: Perl Programming Help: Intermediate: Re: [davorg] "Advanced" Directory Size: Edit Log



etheracide
journeyman

Jul 26, 2004, 7:45 PM


Views: 2451
Re: [davorg] "Advanced" Directory Size

The script is printing out all of the text but is not printing any of the filenames or sizes...nor the total directory sizee. I believe that this is because there is no statement 'telling' the script what $file is? In my code, I 'tell' the script what $file is but I do not think the solution does.

Below is what was printed. It definitely seems to me that $file is the culprit. You will notice bellow that the text is printed out 6 times which would suggest that there are 6 files in the directory, but there are only 4. This would lead me to believe that it is taking the "." and ".." into account as the other two files which might suggest that "unless ($file =~ /^\.+$/)" is not working because it is printing even while $file does equal "." and "..".




File: Size: kilobytesFile: Size: kilobytesFile: Size: kilobytesFile: Size: kilobytesFile: Size: kilobytesFile: Size: kilobytesTotal directory size: 0




I am going to attempt working on this but if anyone can point out how to correct the error, please feel free to =0)


(This post was edited by etheracide on Jul 26, 2004, 7:56 PM)


Edit Log:
Post edited by etheracide (journeyman) on Jul 26, 2004, 7:56 PM


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

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