c:\@Work\Perl\monks\perl -wMstrict -le "my $file = qq{\x0f\xf0\xff}; my $data = unpack( 'H*', $file ); my $count =()= $data =~ /ff/g; print $count; " 2