BTW - your test case would allow newlines after the digits.use Test::More qw(no_plan); my @items = map {pin()} 1..1000; my @bad = grep { ! /\A\d{4}\z/ } @items; is_deeply(\@bad,[],"All pins are 4 digits");
In reply to Re: Testing Random Code
by imp
in thread Testing Random Code
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |