cwd() can be changed to just '.'
opendir my $dir, '.' or die "Can't read current directory (".cwd()."): $!\n";
That applies to the OP too. He could drop $dirname from the command line both simplifying the code and removing his bug.
In reply to Re^2: recognizing OS
by ikegami
in thread recognizing OS
by PerlZealot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |