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.
我想在文本文件中找到一个单词,并将其与一些字符一起保存到一个变量中。例如在文本文件中它会是这样的:
等电点 = 6.2505
我将遍历文件目录,因此等电点的值会改变,这就是为什么我需要将匹配后的字符保存到变量中。
if (my ($point) = $str =~ /Isoelectric Point = (\S+)/) { ... }