Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个名为的文件event.txt,我需要一个 Perl 脚本来打开它并读取tag1和tag2关键字之间的行并将它们打印在屏幕上。
event.txt
tag1
tag2
我已经搜索了论坛并且有类似的问题,但我不知道我应该如何打开文本文件并进行这样的搜索。
while (<>) { print if /tag1/../tag2/; }