Ted, you coding logic is faulty. Here is a much more compact way
to write it right way. :-)

my @adj = qw( totally really truly awesomely );
my @verb = qw( rules rocks dominates );
for my $y (0..20)       # No need to loop 500 times :-)
{
  print "ViM";
  print ' ', ( $_ < $y ? $adj[int(rand @adj)] . ($_ < $y-1 ? ',' : '') :
$verb[int(rand @verb)] . "!\n" ) for 0..$y;
}

Enjoy! :-)

--
Mike Arms


> -----Original Message-----
> From: Ted Schuerzinger [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 21, 2003 9:54 PM
> To: [EMAIL PROTECTED]
> Subject: RE: just installed ActivePerl on my win98 - what's next
> 
> 
> Messenger, Mark graced perl with these words of wisdom:
> 
> > ...and shame on you for continuing it! :)
> 
> Well, if we're going to continue it, we should at least do it 
> in a way 
> that's actually related to Perl.  Here's a small script I 
> cooked up late 
> on a Friday evening:
> 
> #! perl -w
> 
> use strict;
> 
> my ($x, $y);
> 
> foreach $y (0 .. 500) {
>    print "vim";
>    foreach $x (0 .. $y) {
>       if ($x == $y) {
>          print " sucks!\n";
>          }
>       else {
>          print " really";
>          if ($x+1 != $y) {
>             print ',';
>          }
>       }
>    }    
> }     

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to