Directory size calculator

#!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);
closedir(dir);
foreach $f (@thefiles)
{

unless ( ($f eq ".") || ($f eq "..") )
{
#print "$f \n";
$path=join("",$dir,"/",$f);
#print "$path \n";
if ( -d $path)
{
#print "$f a directory \n";

$store[$i]=$path;
$i++;…

About yuvaraj

user-pic I am new to perl. I am about to gather more knowledge and share my knowledge here.