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