I was investigating perl file test operators and found this program on the web:
foreach (@ARGV) {
next unless -f;
$fileSize = -s _;
print("$_ is $fileSize bytes long.\n");
}
My question is - what is the purpose of the "$fileSize = -s _"? Specifically what is the underscore meant to accomplish? I ran it with just "$fileSize = -s" and it returns the same results.
Start Free Trial