# # $Id: code.pl,v 0.1 2000/11/06 20:14:13 ram Exp $ # # Copyright (c) 2000, Raphael Manfredi # # You may redistribute only under the terms of the Artistic License, # as specified in the README file that comes with the distribution. # # HISTORY # $Log: code.pl,v $ # Revision 0.1 2000/11/06 20:14:13 ram # Baseline for first Alpha release. # # $EndLog$ # sub ok { my ($num, $ok) = @_; print "not " unless $ok; print "ok $num\n"; } sub contains { my ($file, $pattern) = @_; local *FILE; local $_; open(FILE, $file) || die "can't open $file: $!\n"; my $found = 0; while () { $found++ if /$pattern/; } close FILE; return $found; } 1;