Trent Rigsbee <[EMAIL PROTECTED]> wrote:
: 
: I think I figured it out! A FIRST!!
: 
: for ($i = 1; $i <= 5; $i++){
:       sleep 1;
:       print "$i\n";
: }

    As you move into larger programs and scripts it
is a good idea to always use strict and warnings.

use strict;
use warnings;

    After adding these to the top of your script
you'll need to use 'my' before using most variables
for the first time:

use strict;
use warnings;

for ( my $i;  $i <= 5; $i++ ) {
    sleep 1;
    print "$i\n";
}


    You can also use the range operator to save some
typing:

for my $i ( 1 .. 5 ) {
    sleep 1;
    print "$i\n";
}


HTH,

Charles K. Clarkson
-- 
Head Bottle Washer,
Clarkson Energy Homes, Inc.
Mobile Home Specialists
254 968-8328
















-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to