On Sat, 2008-09-20 at 13:08 -0700, AndrewMcHorney wrote:
> Hello
> 
> I am working on a perl script which is strictly loops for performance 
> testing. For some reason the index for the quarterback index is not 
> incrementing. Also sometimes I am getting an error message about the 
> last right bracket. I have looked at this for a while and cannot see 
> why this is happening. I could use a second set of eyes to look at this.
> 
> #! /bin/perl

use strict;
use warnings;

> 
> $NumberQuarterbacks = 32;
> $NumberRunningBacks = 60;
> 
> $QuarterbackIndex = 0;
> 
> while ($QuarterbackIndex < $NumberQuarterbacks)
> {
>      $Runningback1Index = 0;
>      while ($RunningBack1Index < $NumberRunningBacks)

# Perl is case sensitive.  If you had use strict, you would know this.

>      {
>          $Runningback2Index = 0;
>          while ($RunningBack2Index < $NumberRunningBacks - 1)
>          {
>              print "QB ".$QuarterbackIndex." ";
>              print "RB1 ".$RunningBack1Index."\n ";
> 
>              $RunningBack2Index = $RunningBack2Index + 1;
>          }
> 

# Why are the following lines indented?

>              print "QB ".$QuarterbackIndex." ";
>              print "RB1 ".$RunningBack1Index." ";
>              print "RB2 ".$RunningBack12ndex." ";
>              $RunningBack2Index = $RunningBack2Index + 1;
>          }

# This } is extra

>          $RunningBack1Index = $RunningBack1Index + 1;
>      }
> 
>      # print "increment\n";
>      $QuarterbackIndex = $QuarterbackIndex + 1;
>      print "\n";
> }
> 
> Thanks,
> Andrew




-- 
Just my 0.00000002 million dollars worth,
  Shawn

"Where there's duct tape, there's hope."
        Cross Time Cafe

"Perl is the duct tape of the Internet."
        Hassan Schroeder, Sun's first webmaster

"There is more than one way to do things."
        A Perl axiom


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to