in reply to Interpolation in Single-quotes?

Other monks have provided the answer you were looking for. A debugging technique I use is to remove as much code as possible to still reproduce the problem. Combining this with use diagnostics;, it may have been more evident what the real issue was, rather than the misleading "Bareword" error.
#!/usr/bin/env perl use strict; use warnings; use diagnostics; my $path = 'C:\chas_sandbox\'; print $path;

outputs:

Can't find string terminator "'" anywhere before EOF at ./686348.pl li +ne 7 (#1) (F) Perl strings can stretch over multiple lines. This message me +ans that the closing delimiter was omitted. Because bracketed quotes +count nesting levels, the following is missing its final parenthesis: print q(The character '(' starts a side comment.); If you're getting this error from a here-document, you may have in +cluded unseen whitespace before or after your closing tag. A good program +mer's editor will have a way to help you find these characters. Uncaught exception from user code: Can't find string terminator "'" anywhere before EOF at ./6863 +48.pl line 7. at ./686348.pl line 7

Hope this helps.

Replies are listed 'Best First'.
Re^2: Interpolation in Single-quotes?
by goibhniu (Hermit) on May 13, 2008 at 20:13 UTC

    I caught on to the problem from the bareword error, but thanks for the reminder about use diagnostics. I always forget that until I'm really desparate.


    #my sig used to say 'I humbly seek wisdom. '. Now it says:
    use strict;
    use warnings;
    I humbly seek wisdom.