Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Time to buy some pills

by smitz (Chaplain)
on Jun 25, 2002 at 10:55 UTC ( #177059=poem: print w/replies, xml ) Need Help??

#!perl # package SMiTZ; BEGIN { until ($age > 19) { $self->freeload && $self->annoy_parents; } } sub new { my ($class, $self) = @_; unless (&work($self) || &sleep($self)) { $self->smoke; $self->cancer_probablity += rand(0.001); } bless ($self, undef); } END { $self->regret($self); $die; }

Dont worry, Im not suicidal or depressed, just wanted to do my Auto-Biography in perl golf.

this is the first poem I ever wrote - thanks Perl

Replies are listed 'Best First'.
Re: Time to buy some pills
by jarich (Curate) on Jun 26, 2002 at 06:56 UTC
    sub new { my ($class, $self) = @_; unless (&work($self) || &sleep($self)) { $self->smoke; $self->cancer_probablity += rand(0.001); } bless ($self, undef); }
    Surely you meant:
    sub new { my ($class, $self) = @_; unless ($self->work() || $self->sleep()) { $self->smoke; $self->cancer_probablity += rand(0.001); } bless ($self, undef); }
    This reads better to me:
    unless I go to work, or I got to sleep....

    My auto-biography in perl poetry would be a lot longer:

    But that's because I'm a pedant, and insist on code that does stuff. :) (My own version has moved all the arrays out of the functions and into the object but that doesn't look as nice.)


      Um the $self->work() won't work as the object hasn't been blessed.


      Brother Frankus.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: poem [id://177059]
Approved by FoxtrotUniform
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2017-03-28 01:27 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (326 votes). Check out past polls.