rewriting checks in Perl
rewriting checks in Perl