#!/usr/bin/perl use strict; open (BLACKBOARD, "+>blackboard"); #look around no strict; use less 'time'; my $hand = 'reluctant'; @chalk = 'obsolete'; sub cheat {print BLACKBOARD "I will not use Perl in C class\n";} until ($caught) { use warnings; &cheat; $teacher_enters = int(rand(10)); if ($teacher_enters == 1) { no warnings; $caught = "red handed"; close BLACKBOARD; delete @chalk[1,2,4]; } else {redo} } die "You are not to use Perl in C class, start the assignment again!";
In reply to From C++ class by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |