On Mon, May 22, 2006 at 01:50:04PM -0600, Jeremy Vinding wrote:
> Graeme McLaren wrote:
> >
> >Public Sub House()
> >
> >On Error Resume drink
> >
> >        If Pint.empty = True Then
> >                Pint.refill
> >  Else
> >                Pint.drink
> >        End if
> >
> >stomach.add Pint
> >
> >MsgBox " I've had .... " & stomach.count & " Pints"
> >MsgBox "VERY DRUNK"
> >
> >End Sub
> 
> sub house {
>     if ($pint->empty) {
>         $pint->refill;
>     } else {
>         $pint->drink;
>     }
>     print " I've had .... ", $stomach++, " Pints\n";
>     print "You must be VERY DRUNK to be posting a 16 line vb sig to a 
> perl list\n";
> }

To be perfectly fair, the code itself is only eleven lines.  On the
other hand, it's still eleven lines of VB in a Perl list, and the sig
block is still sixteen lines long -- roughly four times the reasonable
limit for a sig block.

#!/usr/bin/perl -l
use strict;
use warnings;

# do stuff like define subroutines and variables

while ($conscious) {
  (refill($pint) && next) if empty;
  drink_from($pint);
  print " I've had . . . ", $stomach++, " pints";
}

print "Drunken golf is funner.";

-- 
Chad Perrin [ CCD CopyWrite | http://ccd.apotheon.org ]
"The measure on a man's real character is what he would do
if he knew he would never be found out." - Thomas McCauley

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to