in reply to perl can find the file but can not open the file
Hi,
I'm not sure whether your problem is solved, the right hint was given by choroba. With the code line
you try to open a file with the name './$file' and not with the filename './linux_complete_command_set.txt' as you like. The single quotes suppress variable expansion.open ( FH0, '<./$file' ) or die "Unable to open $file: $!\n";
Another reason to use the three parameters form of open
open (FH0, '<', $file) or die ...
Best regards
McA
|
|---|