in reply to No such file or directory error
Now you can see what filename gives you problems. More likely than not you will see it is an invalid filename (such as containing a linefeed or other illegal character).open OUT, '>', $filename or die ">$filename< error - $!";
PS1: I also changed your open to the three arguments variant. It would even be better if you use lexical variables as filehandles.
PS2: This script is not really "State of the Art", I guess it must be rather old already or based upon an old script, so try not to pick up too many bad habits by studying it.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
My blog: Imperial Deltronics
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: No such file or directory error
by Anonymous Monk on Aug 23, 2012 at 06:02 UTC |