我有一个从数据库填充的Perl变量.它的名字是$path.我需要获取另一个变量$file,它只包含路径名中的文件名.
$path
$file
我试过了:
$file = $path =~ s/.*\///;
我是Perl的新手.
regex string perl operator-precedence
operator-precedence ×1
perl ×1
regex ×1
string ×1