http://www.perlmonks.org?node_id=148407

I'm not sure if this is poetry or not, I'll yet yall be the judge of that.
I guess this is a follow-up node to a past poll, Top goal for the upcoming new year.

I'm getting married in 16 days and I guess I just wrote this little script to make light some of my fears on the subject.

Enjoy,

-Silent11
# use FinalDays::SingleMan; use strict; my $self = 'single'; my $money = 300; my $free_time = 10; my @hard = ('perl','quake', 'basketball', 'the guitar', + 'some more perl','ping-pong'); my @friends = qw(Steve Julie Nathan Colin Jody); my @bills = ('the bills', 'the rent', 'and the expenses' +); my $life = 'undef'; my $in = 3; if ($self eq 'single') { your($self); sleep($in); play(@hard) if $free_time > 0; go_places(@friends); spend($money) if $money; $life = 1; } else { #require patience; $life = 0; my $freedom = 0; $self = 'married'; your($self); unless ( ($self =~m/work/) && (pay(@bills)) ) { loose('my job','my spouse','the car','the nice apartme +nt','and everything'); go_back(2,"my parent's house"); } } ############## subs ################ that actually make it work ! sub spend { my $savings = shift; my $expenses = 200; my $net_worth = ($savings - $expenses); print "\n\nCrap! I'm broke! I've only got $net_worth dollars!! \n +\n Well .....at least I'm still single!!"; sleep(2); print "\n\n The End"; print "\n\n -Silent11"; print "\n\n (getting hitched Mar 16 2002)"; } sub play { my @fun = @_; print "In the meantime.....\n\n"; sleep($in); foreach my $pasttime (@fun) { print " ( enjoying $pasttime )\n\n"; sleep($in-2);} sleep(2); } sub pay { return 0; } sub go_places { my $good_friends = join(', ',@_); print "\"hey, $good_friends, let's all go out!\" \"I'm still sing +le!!!!\""; sleep(3); } sub loose { my $the_bills = join(', ',@bills); my $things = join(', ',@_); print "This is tough!!!\n\n"; print "I forgot to pay $the_bills and I lost $things\n\n"; sleep(1);} sub go_back { print "Shucks! This marriage thing didn't work out, I'm back living in + @_[1]\n\n"; sleep(4); print "\n\n Just Kidding !!!!"; } sub your { print "\n\n\nI'm @_[0] !!!!!! \n\n"; }

Replies are listed 'Best First'.
Re: marital status
by tfrayner (Curate) on Mar 01, 2002 at 12:24 UTC
    Well, I liked it :-)

    Best wishes for the wedding etc.

    Coupla minor points: if you use $_[0] and $_[1] instead of @_[0] and @_[1] this runs under -w without throwing up warnings. Of course, you're probably just readying up for perl 6 :-)

    On a slightly more frivolous note, why not put a random chance of $self='married' in sub go_places or sub play and iterate over the whole thing: perl life.pl :-)

    - Tim