in reply to Belated Perl Valentines Day Love Poem
Messy, and my first attempt, but it's cheaper than a Hallmark card. :o)#!/usr/bin/perl -w use strict; my @nouns=qw(Roses Violets Perl And); my @assoc=qw(red blue pink you); my $i=0; foreach my $item (@nouns) { print $item, (($item=~/s$/) ? " are " : (($item=~/and/i) ? " so are " : " is ")), $assoc[$i], (($item=~/and/i) ? " :-)\n" : ",\n"); $i++; }
--
Me spell chucker work grate. Need grandma chicken.
|
|---|