| Next | Program Repair Shop | 67 |
478 my ($first_block); # read a block here
479 my (%first_block_by_name); # save block by filename
480 # this can get rather large, thus the need to free this ASAP
481 # and return only the filenames as results
482
483 my ($filenm);
484 my ($first_file);
485 my (@return_LoL);
Similarly, this is just wasted space
I suspect that the author is an experienced C programmer
Perl code written by such people has a distinctive aroma
Even in C, we could do this better
In C, you can declare variables at the head of any block:
/* C */
if (buf = malloc(bufsize)) {
char *p = buf;
...
}
In Perl, you can declare variables anywhere
| Next | ![]() |
Copyright © 2006 M. J. Dominus |