Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
24.02.2018, 01:03
|
|||
---|---|---|---|
|
|||
Perl. как вызвать файл? |
|||
#18+
Помогите пожалуйста с таким вот вопросом -) Я написала скрипт, который в линукс терминале должен вызываться так: cat input.txt | perl my_script.pl exclusion_list.txt > output.txt Скрипт должен менять input.txt кроме случаев описанных в exclusion_list.txt и выводить в результат в output.txt. Я написала основную часть программы в while (<>) loop-e, чтобы работала часть cat input.txt | perl my_script.pl С > output.txt также просто. Но никак не могу получить доступ к exclusion_list.txt. my $filename = <STDIN>; open(my $fh, '<', $filename) or die "Could not open file '$filename' $!"; дает: Name "main::SDIN" used only once: possible typo at cid line 59. readline() on unopened filehandle SDIN at cid line 59. Use of uninitialized value $filename in open at cid line 60. Use of uninitialized value $filename in concatenation (.) or string at cid line 60. Could not open file '' No such file or directory at cid line 60. ... |
|||
:
Нравится:
Не нравится:
|
|||
|
|
start [/forum/topic.php?fid=23&mobile=1&tid=1460372]: |
0ms |
get settings: |
8ms |
get forum list: |
13ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
91ms |
get topic data: |
11ms |
get forum data: |
2ms |
get page messages: |
31ms |
get tp. blocked users: |
1ms |
others: | 337ms |
total: | 498ms |
0 / 0 |