Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
159
reputation
2
9

gloomy.penguin

.

#!/usr/bin/perl 

package me; 
# brave new world - huxley
# Was and will make me ill. 
# I take a gramme and only am. 

sub exist {
   my $class = shift; 
   bless {'am'=>'kim'}, $class;     
}

sub think {
   my ($self,$thought) = @_;
   $self->{'am'} = 'ill'; 
}

sub take {
   my ($self,$something) = @_;
   $self->{'am'} = undef 
      if ($something =~ /gram(me)?(s)?/i);
}

sub am {
   my $self = shift; 
   print $self->{'am'} 
         if defined $self->{'am'}; 
   print "\n";
} 

my $i = me->exist();  
   $i->think('was');  
   $i->am(); 
   $i->think('will');  
   $i->am(); 
   $i->take('gramme');
   $i->am(); # now nothing
0
answers
4
questions
~16k
people reached
  • Portland, OR, United States
  • Member for 5 years, 8 months
  • 30 profile views
  • Last seen Apr 30 at 5:31

Top tags (6)

Score 0
Posts 2
Posts % 50
Score 0
Posts 2
Score 0
Posts 1
Score 0
Posts 1
Score 0
Posts 1
Score 0
Posts 1

Top posts (4) All Questions Answers | Votes Newest

Badges (11)

Gold

Silver

2

Rarest

Bronze

9

Rarest