#!/usr/bin/perl -w use strict; use Benchmark; { # Start the benchmark my $start = new Benchmark; for(1..1000) { print qq($ENV{PATH}\n); } # End the program and return the Benchmark time my $end = new Benchmark; print "Processing time was...\n"; print timestr(timediff($end, $start)) . "\n"; } sleep 10; { my $foo = $ENV{PATH}; # Start the benchmark my $start = new Benchmark; for(1..1000) { print qq($foo\n); } # End the program and return the Benchmark time my $end = new Benchmark; print "Processing time was...\n"; print timestr(timediff($end, $start)) . "\n"; }