I'm just writing a script and wish to print a word right after a variable name like:
-d "Templates" or die $self->error("Not a directory : $pathTemplates");
(The templates directory is the "Templates" bit after $path in the error message.
However perl is obviously looking for a variable called $pathTemplates - to get arount this I've changed it to $path\Templates but does anyone know of a better way?
Code:
$path =~ s,^(.*/).*$,$1,; -d "Templates" or die $self->error("Not a directory : $pathTemplates");
(The templates directory is the "Templates" bit after $path in the error message.
However perl is obviously looking for a variable called $pathTemplates - to get arount this I've changed it to $path\Templates but does anyone know of a better way?