So, how does a Perl Programmer eat a Reeses® Cup?

UPDATE:
I just had to have a run at this (14:50)

#WARNING: untested and inefficient :) @swallows = map { chomp(); $_; } @reeses_cups; eval Data::Dumper->Dump(@swallows);

Replies are listed 'Best First'.
RE: Reeses Cup
by swiftone (Curate) on Nov 02, 2000 at 00:38 UTC
    chomp()!

    Or, if you have to share it with a friend,
    split and chomp()!

RE: Reeses Cup
by arturo (Vicar) on Nov 02, 2000 at 00:46 UTC

    while (<REESESCUP>) { my $weight += (tr/(peanut butter|chocolate)//); }
      It's a good thing that the weight you gain disappears with each bite.

      (For those that don't get it, due to his use of my, $weight goes out of scope for each loop...)

        Hey, the weight disappears after every bite! I gotta try that. I knew I wanted my body rewritten in Perl -- not only would it be much easier to debug (if I caught a flu bug, for example), but weight disappearing would be the best.

        $me{body}=join('+',('slim','svelte','sexy')); $me{brain}++; # Love those overload operators.
        Ah, how wonderful.

        =Blue
        ...you might be eaten by a grue...

(redmist) RE: Reeses Cup
by redmist (Deacon) on Nov 02, 2000 at 00:48 UTC
RE: Reeses Cup
by AgentM (Curate) on Nov 02, 2000 at 00:40 UTC
RE: Reeses Cup
by Fastolfe (Vicar) on Nov 02, 2000 at 00:41 UTC
    Assuming a suitably set up Cup:
    $cup->bite; &Reeses::Cup::bite($cup); bite $cup until $cup->is_gone;
    A variation on "There's More Than One Way to Do It" which in my opinion is a great answer in of itself.
RE: Reeses Cup
by Adam (Vicar) on Nov 02, 2000 at 01:41 UTC
    #!perl -w use strict; use IO::Handle; my $Hunger; my %ReesesCup = ( TheLeft => [ 'Chocolate', 'Peanut Butter', 'Fat' ], TheRight => [ 'Chocolate', 'Peanut Butter', 'Fat' ], ); EAT: for( each %ReesesCup ) { next if /The/; # Urge is there. chop( $_->[0] ); chomp( $_->[1] ); chomp( $_->[0] ); ignore( $_->[2] ); } $Hunger = defined $Hunger ? 'Not after that!' : ''; goto EAT if $Hunger; sub ignore {} STDOUT->print( 'Yum!' );
      nick: did that say GOTO?!
(Guildenstern) RE: Reeses Cup
by Guildenstern (Deacon) on Nov 02, 2000 at 00:42 UTC
    Candy::Crunch or by bytes and nibbles!

    Guildenstern
    Negaterd character class uber alles!
RE: Reeses Cup©?
by Rydor (Scribe) on Nov 02, 2000 at 20:55 UTC
    @_=split//,"reesespeanutbuttercup"; print while chomp(); print "\nYum!";


    @:::::::((==========Rydor====>
RE: Reeses Cup©?
by SamQi (Beadle) on Nov 02, 2000 at 22:16 UTC
    Okay, I must take a crack at it...
    open CUP $reesecup;
    while( <CUP> )
    {
      push @stomach, $_;
    }
    
RE: Reeses Cup©?
by IoaPetra (Novice) on Nov 04, 2000 at 19:12 UTC
    sub $newReesesMoment { my $treat=shift; my $self={ HUNGRY => 1, SKINCONDITION => 'fair', MILKRESERVES => 'good', }; bless($self,ThisTreatGodMakeItPure); return $self; } $me=ReesesCupFunction->newReesesMoment(); if $me->{HUNGRY} { unpack($wrapperType,$package); open(MOUTH, "<+/dev/digestion"); recv($currentReeses, $contentsOfTongue); print MOUTH $contentsOfTongue; glob $swallow; require MilkGlass qw(Lift Tilt Drink SetDown); close(MOUTH); $numberOfReesesConsumed++; } if ($numberOfReesesConsumed > 35) { $me->{SKINCONDITION}='acne'; } $me->VerifyMilkReserves(); if ($package==undef) { warn $spouse; } else { sin($more); }
    Okay, it isn't entirely functional, but that ceased to become my priority. :) .:. Ioa Aqualine Petra'ka