http://www.perlmonks.org?node_id=1022985

hashperl has asked for the wisdom of the Perl Monks concerning the following question:

I have just started working on Strawberry Perl, so that I can write some Perl scripts on Windows.

The first problem I have run into is reading "Unicode text, UTF-32, little-endian" files rather than standard "ASCII text".

To add to the problem I am using the "File::ReadBackwards" module as I need to read an application log file and I only want to read the newest errors on a large file.

use File::ReadBackwards; my $ERRORLINES_IN = File::ReadBackwards->new($logfile) or die "$logfil +e : $!\n"; while (defined($logline = $ERRORLINES_IN->readline)) {

From my snippet of code would someone be able to point me in the right direction for determining the file type and then opening the file type using the ReadBackwards module.