Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

i love you. Love poem with output.

by The Elite Noob (Sexton)
on Mar 23, 2011 at 01:29 UTC ( #894915=poem: print w/ replies, xml ) Need Help??

First try :) Feedback appreciated.
#!/usr/bin/perl -w #myHeart, A Poem by TheEliteNoob $i = "u"; $u = "i"; $love = "u+i"; my $heart = "$u make my heart flutters..."; if($i ne "Not with $u"){ $heart = "Just Breaks"; } $me = "just thinks of $u"; while($me eq $u){ $sad = "when not with $u"; $happy = "with $u my love"; last; #forever } while($me && $u eq $love){ $me = "$happy and not $sad"; last; #forever } $myLove = "$u love $i"; print "\n$myLove\n";

Comment on i love you. Love poem with output.
Download Code
Replies are listed 'Best First'.
Re: i love you. Love poem with output.
by marto (Bishop) on Mar 23, 2011 at 10:31 UTC

    Are you sure this does what you mean? I've added a couple of lines to print $heart and $me:

    #!/usr/bin/perl -w #myHeart, A Poem by TheEliteNoob $i = "u"; $u = "i"; $love = "u+i"; my $heart = "$u make my heart flutters..."; # Added print "$heart\n"; if($i ne "Not with $u"){ $heart = "Just Breaks"; } $me = "just thinks of $u"; # Added print "$me\n"; while($me eq $u){ $sad = "when not with $u"; $happy = "with $u my love"; last; #forever } while($me && $u eq $love){ $me = "$happy and not $sad"; last; #forever } $myLove = "$u love $i"; print "\n$myLove\n";

    Displays:

    i make my heart flutters... just thinks of i i love u
      Actually it is what i meant, thats how i wrote it.

      I think the poem's source is more important than the output.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: poem [id://894915]
Approved by mertserger
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2015-07-29 12:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls