#!/usr/bin/perl use strict; use warnings; use FindBin qw/$Bin/; use Benchmark (qw/timediff timestr/); use Image::BMP; my $t0 = Benchmark->new(); my $img = new Image::BMP; $img->open_file($Bin . '/a.bmp'); my ($r,$g,$b) = $img->xy_rgb(10,10); my $t1 = Benchmark->new(); my $td = timediff($t1, $t0); print "the code took:", timestr($td),"\n";