Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Machine Balerina / Suzanne Vega

by yosefm (Friar)
on Aug 05, 2003 at 10:47 UTC ( [id://280942]=poem: print w/replies, xml ) Need Help??

This is my first attempt at Perl poetry. I translated Machine Balerina from Suzanne Vega's Songs in Red and Gray into perl. It compiles and runs under strict, but it's pretty long, so please be patient.

# Machine Balerina # By Suzanne Vega # First, some definitions: use strict; our ($i_am, %you, $your, $we); # get these 'my' out of the way. my $what = "thrown and received"; my $when = "on somebody's birthday"; my $whatfor = "for tease and delight"; sub soldier_of_tin { my %position = @_; while ($you{sit} eq 'royal') { if ($position{standing} eq 'loyal') { return "soldier of tin"; }else {return;} } } sub your_phantasy_girl { my $parts; if ($parts = made_of($i_am, 'puzzling parts') and not $parts eq (' +fits' or 'starts') and $we =~ /wits/ and $we !~ /hearts/) {return "heard but neve +r seen";} else {return "phantasy girl";} } sub made_of { my $material = shift; if ($material =~ /parts$/) { $material =~ s/\s*parts$//; return $material; } } # The ultimate question... sub what_am_I { if (($i_am eq "a thing on a a string to be $what $when $whatfor") and print "goodnight" and print "goodby") { return "an afternoon pastime"; } else { my $retval; for my $something ( "a toy on a tray", "a soft piece of clay", "qween or clown for the day", "machine balerina", soldier_of_tin(standing => 'loyal') ) {($retval = ("$i_am, " . &chorus)) if ($i_am eq $something) } unless ($retval) { for my $something ( "Mad Magazine", "skin trampoline", "pin-up pinball machine", your_phantasy_girl ) {($retval = ("$i_am, " . &chorus)) if ($i_am eq $something +) } } unless ($retval) {$retval = "your love";} return $retval; } } sub chorus { for $your ("approval", "persual", "possible refusal") { $i_am = "amusing"; $i_am = "a puppet for your play"; } return $i_am; } OPTIMISTIC_RUN: $we = "equal in wits"; $you{sit} = 'royal'; print "what am I to you? \n"; print what_am_I; PESIMISTIC_RUN: $i_am = "soldier of tin"; print "\n\nwhat am I to you? \n"; print what_am_I;

Update: fixed a typo. Thanks, Aristotle.

Replies are listed 'Best First'.
Re: Machine Balerina / Suzanne Vega
by Aristotle (Chancellor) on Aug 05, 2003 at 17:53 UTC
    # Bye Suzanne Vega
    Where did she go? ;-)

    Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2026-02-06 22:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.