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!
use strict;#10 #32 #32 #32 #32 #32 #32 #32 #32 use warnings;#32 #32 #82 package Cat;#73 sub new { my $class = shift; return bless {@_}, $class }#80 sub feed{ my $me = shift; $me->{last_meal} = shift}#32 package Person;#10 sub new { my $class = shift; return bless {@_}, $class }#32 #49 package main;#55 #32 my $cat = Cat->new(#65 colors => [ qw(green white) ],#117 age => 0,#103 house => 'wilderness',#32 attitude => 'brave',#50 eyesight => 'keen',#48 PID => undef ,#48 );#54 #32 my $person = Person->new( #45 attitude => 'compassionate',#32 house => 'wonderful',#51 );#49 #32 my $three_months = 60 * 60 * 24 * 90;#74 # sleep $three_months;#97 $cat->{ age }+= $three_months;#110 $cat->{ house } = \$person->{house};#32 $cat->{ name } = 'Miki';#50 $cat->{ best_meal } = 'anchovies';#48 $cat->{ feeling } = 'good';#50 #53 #10 my $eighteen_years = 60 * 60 * 24 * 12 * 18;#32 #32 #32 #32 #32 #32 #32 #32 #32 #32 #32 # sleep $eighteen_years; $cat->{ age }+= $eighteen_years;#47 $cat->{ kidneys } = 'failing'; #92 #95 #47 #92 #10 my $other_three_months = 60 * 60 * 24 * 90; #32 #32 #32 #32 #32 #32 #32 #32 #32 #32 # sleep $other_three_months; $cat->{ age }+= $other_three_months; #40 #32 #111 #32 #111 #32 #41 #10 $cat->{ eyesight } = 'blind'; #32 #32 #32 #32 #32 #32 #32 #32 #32 #32 $cat->{ feeling } = 'suffering'; #62 #61 #95 #89 #95 #61 #60 #10 if ( $cat->{ feeling } ne 'good' and $person->{ attitude } eq 'compass +ionate' ){ #32 #32 #32 #32 #32 #32 #32 #32 #32 #32 $cat->feed('anchovies'); #32 #32 #96 #45 #39 #10 $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 $. == 5; } } __DATA__ meow!
L*
|
---|