in reply to Perl High School Graduation
is more idomatically written asfor($a=0;$a<10;$a++){...}
But that's just nitpicking, one thing i saw that I would definately recommend against is assigning file contents to arrays. It's better to process files in real time line by line especially for large files. That way perl doesn't have to keep track of (dozens||hundreds||thousands) of array elements.for(1..10){...}
Hope you find some of these comments useful, overall I would say that your course looks great, and that you seem to be commited to teaching Perl over PERL. And that's always good to see. Perl's object oriented features are best introduced through modules. I would focus on using CGI, DBI, LWP, Tk, the HTML::Parser series. For beginner and even advanced Perl Programmers being able to effectively use existing modules is a necessity.@lines = <FILE>#potentially expensive #a bit better while(my $line = <FILE>){ chomp $line; ...do something with $line }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Perl High School Graduation
by hsweet (Pilgrim) on May 20, 2002 at 19:01 UTC |