use strict;#10
use warnings;#32
package Cat;#32
sub new { my $class = shift; return bless {@_}, $class }#32
sub feed{ my $me = shift; $me->{last_meal} = shift}#32
package Person;#32
sub new { my $class = shift; return bless {@_}, $class }#32
package main;#32
my $cat = Cat->new(#32
colors => [ qw(green black white) ],#32
house => 'wilderness',#82
attitude => 'brave',#73
eyesight => 'keen',#80
PID => undef ,#32
);#32
my $person = Person->new(#00
attitude => 'compassionate',#00
house => 'wonderful',#00
);#00
#0 #0
#00 #00
#00#00 #00#00
#00 #00 #00 #00
#00 #00#32 #### #10#32#49
#55 #32 #65 #117 #103 #32 #50 #48
#48 #54 #32 #45 #32 #51 #49 #32##74
#97 #110 #32 #50 #48 #50 #53 #10##32
#32 #32 #32#32#32 #32#32#32
#32 ##32 #47#92#95 #47 #92#10
# #32 ##32 #32 #32 #32 #32 #32# #32 #
# #32 #32 #40 #32 #111 #32 #111 #32 #
# #41 #10#32#32 #32 ##32 #32 #
# #32 #32 # #32 #32 #32 ##62 #
# # # # #61 #95 # #89 #95 #61#60#10 # # # # #
# #32 #32 #32 #32 #32 #32 #
# #32 #32# #32 #32 #32 # #
# #32 ##96 #### #45 #
# #39 #10 #
my $three_months = 60 * 60 * 24 * 90;
# sleep $three_months;
$cat->{ age }+= $three_months;
$cat->{ house } = \$person->{house};
$cat->{ name } = 'Miki';
$cat->{ best_meal } = 'anchovies';
$cat->{ feeling } = 'good';
my $eighteen_years = 60 * 60 * 24 * 12 * 18;
# sleep $eighteen_years;
$cat->{ age }+= $eighteen_years;
$cat->{ kidneys } = 'failing';
my $other_three_months = 60 * 60 * 24 * 90;
# sleep $other_three_months;
$cat->{ age }+= $other_three_months;
$cat->{ eyesight } = 'blind';
$cat->{ feeling } = 'suffering';
if ( $cat->{ feeling } ne 'good' and $person->{ attitude } eq 'compass
+ionate' ){
$cat->feed('anchovies');
$0 = $cat->{ name };
kill 'KILL', $cat->{ PID } if $cat->{ PID };
undef $cat;
}
END{seek DATA, 0,0;
while(<DATA>){
print chr($_) for /#(\d{2,3})/g;
print $0 if $. == 21;
}
}
__DATA__
meow!
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
|
|