my ($location) = @_; $location =~ s{ ([\\\']) }{ '\\' . $1 }gex; # crude escape print "\n".'Calculating Scan Statistics...'."\n"; my $cmd = "du -sk '$location'"; warn $cmd; # let's see what's actually getting executed! my $size = `cmd`; print "$size";