我想知道如何substr($text, 12)
将变量的结果()封装$opt
到自身中(将结果替换表达式substr($text, 12)
),但是我该怎么做呢?
如果需要的话。这是我的代码:
my $text;
my $opt = substr($text, 12);
if ($command =~ /^Hello World Application/i) {
print "$opt\n";
}
# More code....
print # Here I want to print the result of 'substr($text, 12)' in the if