in reply to Re: Checking files in a directory
in thread Checking files in a directory
... 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'
|
---|