... problem: the single quotes around $directory in your homebrew error message will prevent Perl from interpolating the var.
Not so. The scalar is interpolated within double-quotes; the single-quotes in the same string have no effect on interpolation.
>perl -wMstrict -le "my $string = 'hi there'; my $strung = qq{'$string'}; print $strung; " 'hi there'
In reply to Re^2: Checking files in a directory
by AnomalousMonk
in thread Checking files in a directory
by Aim9b
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |