Hi,

I'm trying to print directory sizes using script from

http://coding.derkeiler.com/Archive/Perl/perl.beginners/2005-08/msg00693.html

and when I try it from the cmd.exe

C:\Perl>perl Print_directory_sizes.pl "C:/Temp"

but I get an error message saying

use of uninitialized value.... etc.

Where is the problem? I'm using Win XP.

---code---
#!/bin/perl

use warnings;
use strict;
use File::Find::Rule;

my $dir = $ARGV[0];
my $size;

find( sub { -f and ( $size += -s _ ) }, $dir );
---code---

Reply via email to