📄 list_cats.pl
字号:
#!@install.perl.bin@ -wuse strict;my $xml_data_file = shift(@ARGV) or die "no file given!\n";my @targets;my $lookin = 1;open (FILEIN, $xml_data_file) or die "unable to open $xml_data_file for reading: $!\n";while (<FILEIN>) { if ($lookin) { $lookin = 0 if (/<name>[Aa]vailability<\/name>/i); next; } $lookin = 1 if (/<\/view>/); if (/<label>(<\!\[CDATA\[)?([a-z&; ]+)(\]\]>)?<\/label>/i) { my $category=$2; $category =~ s/\&/\&/g; $category =~ s/\"/"/g; $category =~ s/\'/'/g; push (@targets, $category); }}close (FILEIN);for (@targets) { print $_, "\n";}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -