C for statement version in Perl

K

Kelly

Hi,

I want to do this, in C, this is how to do it

for (i=0;i<4000;i++)
.....write to a file...
.....

is there a function to write 4000 times to a file
in perl?

Thanks.

kel
 
J

Jürgen Exner

Kelly said:
I want to do this, in C, this is how to do it

for (i=0;i<4000;i++)
....write to a file...
....

is there a function to write 4000 times to a file
in perl?

1) Exactly the same code will work in Perl, too.
2) The more perlish style would be
for my $i (0..3999) { write to a file}

jue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top