Lightning flashed, thunder crashed and "Kaustav Bhattacharya" <kaustav@kaustav.
uk.com> whispered:
|       open(BOOT_FILES,">boot_files.txt");
|       print BOOT_FILES @FILES;
|       close BOOT_FILES;

You should always check the return of open and close...

open BOOT_FILES, ">boot_files.txt" or die "Can't open boot_files: $!\n";
print BOOT_FILES @FILES;
close BOOT_FILES or die "Can't close boot_files: $!\n";

While we're at it, your subroutine doesn't contain a loop, but you are
pushing the line into an array.  Then opening the file, writing the array
(a single item) then closing the file.  That's a lot of opens, writes, and
closes.  You really only need a single open and close.

-sp

Reply via email to