in reply to Re^2: problem to open a specified path file in open system call
in thread problem to open a specified path file in open system call
open(FILE,$path1/build.log) or die "$!\n"; why this will not open the build.log?
In case it's not just a typo in this post... you'd need to either interpolate
open(FILE,"$path1/build.log") or die "$!\n";
or concatenate the strings
open(FILE,$path1."/build.log") or die "$!\n";
Using strictures would have revealed the problem. With use strict; you'd have gotten:
Bareword "build" not allowed while "strict subs" in use at ./626616.pl + line 8. Execution of ./626616.pl aborted due to compilation errors.
and with use warnings; even more:
Unquoted string "build" may clash with future reserved word at ./62661 +6.pl line 8. Name "main::FILE" used only once: possible typo at ./626616.pl line 8. Argument "build" isn't numeric in division (/) at ./626616.pl line 8. Argument "." isn't numeric in division (/) at ./626616.pl line 8. Illegal division by zero at ./626616.pl line 8.
|
|---|