in reply to
Looking for small csv files script question
I'm not saying the other suggestions are wrong, but those suggestions are using some syntax that I personally don't understand - at least not without looking up documentation and/or doing some testing. That's why I would prefer going with something that I find easier to read and understand. Just a personal preference.
I haven't tested this, but the code below is something that I believe should accomplish what you're wanting to do and is something that I personally find much easier to read and understand.
my $target = 'C:\temp';
my $rule = File::Find::Rule->new;
$rule->file; # Look for files (-f test)
$rule->name('*.csv'); # Look for filenames ending in .csv
$rule->size(<5500); # Look for a size of less than 5500 bytes
my @files = $rule->in($target);
# The @files array will have the files that meet the 'rules' above.
I realize that this doesn't go well with your comment that you "can't install other File:Find module alternatives". Out of curiosity, why are you limited by not installing any modules?