I am trying to write a simple perl script that will iterate through the regular files in a directory and calculate the total size of all the files put together. However, I a
You have a typo:
$cursize = -s _;
Should be:
$cursize = -s $_;