Gavin Henry said: >> Can we actually loop over the 'while diamond'? >> Please kindly advice how can I overcome this problem. > > I don't know if I'm skilled enough to answer this yet, but shouldn't you > be using:
Nope, sorry. It helps if I *actually* read the rest of your e-mail. Sorry. > > my @myarray = <FILE>; > > foreach (@myarray) { > do stuff > } > > >> Thanks so much for your time. >> >> Regards, >> Edward WIJAYA >> SINGAPORE >> >> >> __BEGIN__ >> use strict; >> use warnings; >> use Getopt::Std; >> >> our $opt_f; >> getopts('f:'); >> >> open INFILE, "<$opt_f" or die "$0: Can't open file $opt_f: $!"; >> >> my $trial = 2; >> >> #What's wrong with running a for loop over the 'while' here? >> for ( my $t = 1 ; $t <= $trial ; $t++ ) { >> print "Trial ", $t, "\n"; >> >> while (<INFILE>) { >> print; >> } >> } >> >> __END__ >> >> -- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> <http://learn.perl.org/> <http://learn.perl.org/first-response> >> >> >> > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>