Use "-s FILENAME" to return the size (in bytes) of a file, see perlfunc for more info. You'd want something like this
if (-s $fileOne != -s $fileTwo) { print "have different sizes\n"; } else { print "the same size\n"; };
Some other things to think about:
Hope this helps.
In reply to Re: comparing size
by adrianh
in thread comparing size
by splitOnce
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |