我有三个文件(两个制表符分隔的字段,文件间没有冗余)。我想要并行读取它们并将它们的内容存储在一个散列中。 这是我的尝试: use warnings;
use strict;
use Parallel::ForkManager;
use Data::Dumper;
my @files = ('aa', 'ab', 'ac');
my %content;
my $max_process
我想知道段落中有多少单词,然后找到每个单词出现次数。 我可以做到这一点,但是有没有其他方法可以只使用正则表达式? my $string = "John is a good boy. John goes to school with his brother Johnny. When John is hungry, he eats his tiffin.";
my @list =();
while
我想要这些映射:ABcD - > ABccD,xyzK - > xxyyzzK等 我可以写一个循环来做到这一点。但是有没有办法用正则表达式来实现呢?我可以找到所有带小写字母[a-z]的小写字母。我如何编写替换部分? $string =~ s/[a-z]/....../g; # How do I fill in for the ...... ?