yuvaraj
- About: I am new to perl. I am about to gather more knowledge and share my knowledge here.
Recent Actions
-
Commented on Directory size calculator
Well that's right confuseAcat. I will correct it....
-
Commented on Directory size calculator
Hi confuseAcat, I use to get the Disk space used for a particular directory using this script and it works as i expected. Do you find any problem with this....
-
Commented on Directory size calculator
Thanks for your information Sherr. This is the first time i am posting a blog and that's why there is discrepancy in it's proper format. I will make a note of it and with my next post i'll surely follow...
-
Posted Directory size calculator to yuvaraj
#!c:\perl
chop ($dir=STDIN);
$i=0;
$store[$i]=$dir;
$i++;
readfiles();sub readfiles
{
foreach $dir (@store)
{
opendir (DIR, $dir) or die "failed to open:$!";
@thefiles= readdir(DIR);
clos…
Comment Threads
-
Michael J commented on
Directory size calculator
are you able to install CPAN modules? (if not, then that's a big drawback to learning Perl)
searching for 'dir size' finds https://metacpan.org/module/Win32::DirSize
which sounds like it might already do this for you...?
-
confuseAcat commented on
Directory size calculator
Well, you are not closing the directory handle that you opened. It works, yes. Because in this case the call to closedir is superfluous. To be totally explicit: you are opening DIR, but you are closing dir.
About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.