CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [lt007] Opening and closing files in loop: Edit Log



gerble1000
User

Oct 22, 2012, 1:46 AM


Views: 575
Re: [lt007] Opening and closing files in loop

what is the value of $max
i am only a beginner but i think the sintax for the loop is this

for (my $i=1; $i<$max; $i++)


try this


Code
    for (my $i=0; $i < $max; $i++){   

$pwd = &randomPwd($nmbchars);
select (DB);
print qq("$dept$w$i","7 days","$pwd",,,,,,\n);
close(DB);
select (newDB);
print qq("$dept$w$i"\t>\t"$pwd"\n);
close(newDB);

}



(This post was edited by gerble1000 on Oct 22, 2012, 1:57 AM)


Edit Log:
Post edited by gerble1000 (User) on Oct 22, 2012, 1:54 AM
Post edited by gerble1000 (User) on Oct 22, 2012, 1:57 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives