in reply to Error while trying to open a file

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^2: Error while trying to open a file
by Anonyrnous Monk (Hermit) on Jan 05, 2011 at 11:35 UTC

    Don't think this is going to help:

    #!/usr/bin/perl -wl my $artefact = "foo"; my $file = "C:/abc/def/klm/Properties/$artefact.properties"; print $file; $file = 'C:/abc/def/klm/Properties/' . $artefact.properties; print $file;

    gives

    $ ./880572.pl Unquoted string "properties" may clash with future reserved word at ./ +880572.pl line 9. C:/abc/def/klm/Properties/foo.properties C:/abc/def/klm/Properties/fooproperties

    and with use strict you'd get

    $ ./880572.pl Bareword "properties" not allowed while "strict subs" in use at ./8805 +72.pl line 10. Execution of ./880572.pl aborted due to compilation errors.
      use of chomp for the input helped solve the issue.