in reply to Bad name after xxxx'

Works for me on *nix on everything form 5.6 to 5.12 with no errors (after putting something in for the CONSTANT's). Any change you've got some weird unprintable character in it somehow? What are you using for an editor?

The various forms of multiple quoting you have wouldn't work, except the one using a plain doublequote ". That should work, but single quote is also fine. The issue with single quotes acting like package names is when they look like part of the variable; e.g., if you had $x = "$users's coat".

Replies are listed 'Best First'.
Re^2: Bad name after xxxx'
by KyussRyn (Acolyte) on Jan 25, 2011 at 05:42 UTC
    This is the closest to a solution of the replies so far, I am using Eclipse with EPIC package installed. When I save the file the previously mentioned error appears.
    #!c:\Perl\bin\perl use warnings; use strict; use CGI ':standard'; use constant CONSTANT1 => '../perlscript1.pl'; use constant CONSTANT2 => '../perlscript2.pl'; my $htmlPage = CGI->new; print $htmlPage->a( { -href => CONSTANT2 , -target => '_self' }, '&#12371;&#12385;&#12425;' + ); print "</p>\n<p>"; print $htmlPage->a( { -href => CONSTANT1 , -target => '_self' }, '&#21033;&#29992;&#35215;& +#32004;' ); print "</p>";