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.
このサブルーチン (ルート ディレクトリではない有効なパスで呼び出された) が親ディレクトリを返さない状況はありますか?
use Cwd qw( realpath ); use File::Basename qw( dirname ); sub parent_dir { my $dir = realpath shift; return dirname $dir; }