perl 스크립트로 파일을 읽어야합니다.perl에서 읽기 위해 파일을 열 수 없습니다.
print "Input file name: ";
$file = <>;
open($fileHandle, "<", $file) or die "cannot open < $file: $!";
결과 :
cannot open < scores.dat
: No such file or directory at ./project5.pl line 6, <> line 1.
이 I를하는 내가 찾은 자원의 대부분이 할 얘기 무슨 짓을하지만 같은 오류가 계속 여기 내 코드입니다 매번 오류가 발생합니다. 어떤 아이디어라도, 나는 perl에 익숙하지 않아서 어리석은 실수를 할 준비가되어 있지만, 그렇습니다. scores.dat는 존재합니다.
참조 용 : http://perldoc.perl.org/functions/chomp.html – chilemagic