Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

In love with perl

by gilbert0 (Monk)
on May 01, 2003 at 21:43 UTC ( [id://254829]=poem: print w/replies, xml ) Need Help??

I just started perl a week ago, so this is one of my first pieces of code. All comments are welcome.
#!usr/bin/perl #Written by gilbert for UEC. # -should be up soon...- #Mail for bugs, improvements, questions, + insults or loveletters. #I'm just a beginner so this is crappy code. use warnings; use strict; #Before I met you, I was like a $calar. my $lonely = "Gilbert"; #When we got together, we lived in our own @rray of love. my @love = ("Gilbert","lieselotte"); #When we have sex, it is like we become one. my $sex = join "=" , @love; #Now we are like a pair of data, safely surrounded by the hash of love +. my %marriage = ( gilbert => "lieselotte" ); print "$lonely\n"; print "(@love)\n"; print "$sex\n"; for (keys %marriage) { print "$_ loves $marriage{$_} forever.\n"; } while (1) { print "Let our love be as infinite as this loop.\n"; }

Replies are listed 'Best First'.
Re: In love with perl
by zentara (Archbishop) on May 02, 2003 at 13:34 UTC
    How about:
    package After5years; require Exporter; @ISA = qw|Exporter|; @EXPORT_OK = qw|lawyer|; sub lawyer { print "Where's that pre-nuptial agreement?\n"; } 1;
Re: In love with perl
by ctilmes (Vicar) on May 02, 2003 at 10:27 UTC
    --------------------------------------------- #I'm just a beginner so this is crappy code. use warnings; use strict; ---------------------------------------------
    This is a good start!
Re: In love with perl
by draconis (Scribe) on May 02, 2003 at 15:55 UTC
    And to get a glimpse of the future

    YearsFromNow(); sub YearsFromNow { $wifeWeight=120; $yearsGoBye=10; $wifeAppeal=10; while($yearsGoBye > 0){ $wifeAppeal--; $wifeWeight=$wifeWeight + 7; $yearsGoBye--; if($yearsGoBye == 5){ $add2Kids = 2; $wifeWeight = $wifeWeight + 15; } print "Appeal = $wifeAppeal\n"; print "Weight = $wifeWeight\n"; } }
      :) And what about dying?
      Dying(); sub Dying { die "Oops! He's dead...\n"; }
Re: In love with perl
by Aristotle (Chancellor) on May 03, 2003 at 02:05 UTC
    Bah, we seem to have a lot of jaded people here. Just ignore them. :)

    Makeshifts last the longest.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: poem [id://254829]
Approved by crenz
Front-paged by crenz
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-16 21:00 GMT
Find Nodes?
    Voting Booth?

    No recent polls found