I am beginning to delve deeper into Perl, but am having trouble writing \"Perl-ly\" code instead of writing C in Perl. How can I change the following code to use more Perl idiom
One simple change is to use for loops like this:
for
for my $i (0 .. $num_of_rows){ # Do stuff. }
For more info, see the Perl documentation on foreach loops and the range operator.