in reply to Re: Can't open file within subroutine
in thread Can't open file within subroutine
withopen(INFO, <"/export/home/cad/data/products/$name/source/$name.bom">)
This should work if you want to just read from INFO.open(INFO, "/export/home/cad/data/products/$name/source/$name.bom")
this will read all of the file into the lines array and then close the file (which is always good practice)@lines = <INFO>; close (INFO);
|
|---|