uhhh ... i'm not familiar with such ... but if this is the case then you even read it in - determine the size and then decide which output is to be generated. looks like overhead of course, and it is - but i can't say whether or how to determine filesize if something like this fails:
- #!/usr/bin/perl -w
-
-
$filename = '/path/to/your/file.ext';
-
$filesize = -s $filename;
PS: such a question might be answered better in the PERL forum then