私はunlink()
ここで完全に困惑しています:
my $file = "\"/home/user/Documents/Programming/Perl/extracted/Prueba con formateo HTML/msg-2575-4.html\"";
unlink($file) or warn "Could not unlink $file: $!";
投げます
Could not unlink "/home/user/Documents/Programming/Perl/extracted/Prueba con formateo HTML/msg-2575-4.html": No such file or directory
ファイルが実際に存在している間:
$ ls -l "/home/user/Documents/Programming/Perl/extracted/Prueba con formateo HTML/msg-2575-4.html"
-rw-rw-r-- 1 user user 413 Mar 25 13:41 /home/user/Documents/Programming/Perl/extracted/Prueba con formateo HTML/msg-2575-4.html
編集:私も試しました:
my $file = "/home/user/Documents/Programming/Perl/extracted/Prueba con formateo HTML/msg-2575-4.html";
my $file = '/home/user/Documents/Programming/Perl/extracted/Prueba con formateo HTML/msg-2575-4.html';
my $file = "\'/home/user/Documents/Programming/Perl/extracted/Prueba con formateo HTML/msg-2575-4.html\'";
同じエラー。
EDIT2:chorobaが必要とするより多くのテスト
でファイルの存在をテストすると、-f
falseが返されます。
これが実際のファイル名の16進ダンプです。
$ ls "/home/yasin/Documents/Programming/Perl/extracted/Prueba con formateo HTML/msg-2575-4.html" | hexdump -c
0000000 / h o m e / y a s i n / D o c u
0000010 m e n t s / P r o g r a m m i n
0000020 g / P e r l / e x t r a c t e d
0000030 / P r u e b a c o n f o r m
0000040 a t e o H T M L / m s g - 2 5
0000050 7 5 - 4 . h t m l \n
000005a