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


in reply to Problem using Test::Simple

The first warning is because on the third line of the main bit of code you've used $a, but that's the only place you've used it. You can find out more about perl's warnings by checking in perldiag or using the diagnostics pragma.

The problem with the benchmarking part of the code looks like two things: a) you're using 'stdin' and not 'STDIN'; b) you're only looping once. The first is because the four builtin filehandles (STDIN, STDOUT, STDERR, and DATA) are all in uppercase not lowercase, so your code perhaps should be $b = <STDIN>. The warning is produced by Test::Benchmark because you've only specified one iteration to is_faster which means the code executes faster than the resolution of the system clock.

--
integral, resident of freenode's #perl

Replies are listed 'Best First'.
Re^2: Problem using Test::Simple
by ambrus (Abbot) on Jul 22, 2004 at 13:12 UTC

    stderr is an obsolate alias for STDERR. It should work, but give a warning.