#!/usr/bin/perl use Test::More tests => 1; use Test::Benchmark; is_faster(10000,sub {$a=9; print "enter a name \n"; $b=; print "$b\n";}, sub { print "give input"; $b=; chomp($b) ; print "$b \n";},"res1 is faster than res2");