Perl The easy way Contibuted by: Akuseru1 This is the way everyone in the Programmer Nullposting group says is the best. sub isEven { my $var = $_[0] % 2; if(!$var) { return 1; } else { return 0; } }