Tuesday, June 24, 2008

Today's Perl cat test

For your viewing pleasure, here is the cat test from today's candidate:

sub bin_cat {
my (file) = @_;
defined file || die;
my y = open (file, "r")
while (my x = read(y)) {
print (x);
}
}