for my $how_do_i_love_thee (0..$let_me_count_the_ways) { print "I love thee for $reason{$how_do_i_love_thee}\n" }

Replies are listed 'Best First'.
Re: How do I love thee? Let me iterate the ways
by zakzebrowski (Curate) on Sep 07, 2004 at 12:16 UTC
    What about...
    print "How do I love thee? "; &let_me_count_the_ways; sub let_me_count_the_ways{ open (WAYS,"<reasons.txt"); my @of_my_ways = <WAYS>; my $count=0; foreach (@of_my_ways){ $count++; print "$count, $_\n"; } close WAYS; print "$count ways I love thee.\n"; }

    PS. First poem post...


    ----
    Zak - the office
Re: How do I love thee? Let me iterate the ways
by Spidy (Chaplain) on Sep 07, 2004 at 02:39 UTC
    Remind me to use that on the next Female Japh I meet...