KyussRyn has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
I am having a minor problem with a "Bad name After" error. I am using Strawberry Perl 5.12.1 on Windows XP. here is some dummy cope:
On Line 12 I get an error saying "Bad name after _self'". I have read that perl used to allow pkg'$var and this is still supported so I have tried:
Now I say this is not a major problem as the code builds and runs fine, but I am still getting this error message and would like to understand why.
Thank you in advance for any help you can give.
Kind regards,
KyussRyn
P.S. The hashed codes are japanese characters.
****EDIT****
I am using Eclipse with EPIC, and the pages are coded into UTF-8 through the interface. I tried out the use utf8; line, and that created a recursion error. I have also retyped the troubled lines, copied it from Line 10, and used the same word as well, but to no avail.
I am having a minor problem with a "Bad name After" error. I am using Strawberry Perl 5.12.1 on Windows XP. here is some dummy cope:
01: #!c:\Perl\bin\perl 02: use warnings; 03: use strict; 04: use CGI ':standard'; ED: use constant CONSTANT1 => '../perlscript1.pl'; ED: use constant CONSTANT2 => '../perlscript2.pl'; 05: my $htmlPage = CGI->new; 06: 07: print "\n<p>ID/パスワート +5438;を忘れた方は"; 08: print $htmlPage->a( { -href => CONSTANT2 09: , -target => '_self' }, 'こちら' ); 10: print "</p>\n<p>"; 11: print $htmlPage->a( { -href => CONSTANT1 12: , -target => '_self' }, '利用規約' + ); 13: print "</p>";
On Line 12 I get an error saying "Bad name after _self'". I have read that perl used to allow pkg'$var and this is still supported so I have tried:
These other alternatives provide variations of the error. I am pretty certain also that it is not the Japanese characters causing the problem either, as I have tested the same characters in other places.12: , -target => ''_self'' }, '利用規約 +;' ); 12: , -target => "_self" }, '利用規約' + ); 12: , -target => "'_self'" }, '利用規約 +;' );
Now I say this is not a major problem as the code builds and runs fine, but I am still getting this error message and would like to understand why.
Thank you in advance for any help you can give.
Kind regards,
KyussRyn
P.S. The hashed codes are japanese characters.
****EDIT****
I am using Eclipse with EPIC, and the pages are coded into UTF-8 through the interface. I tried out the use utf8; line, and that created a recursion error. I have also retyped the troubled lines, copied it from Line 10, and used the same word as well, but to no avail.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Bad name after xxxx'
by GrandFather (Saint) on Jan 25, 2011 at 04:08 UTC | |
Re: Bad name after xxxx'
by ikegami (Patriarch) on Jan 25, 2011 at 04:54 UTC | |
by KyussRyn (Acolyte) on Jan 25, 2011 at 05:46 UTC | |
Re: Bad name after xxxx'
by fullermd (Priest) on Jan 25, 2011 at 04:21 UTC | |
by KyussRyn (Acolyte) on Jan 25, 2011 at 05:42 UTC | |
Re: Bad name after xxxx'
by JavaFan (Canon) on Jan 25, 2011 at 12:28 UTC | |
by KyussRyn (Acolyte) on Jan 26, 2011 at 01:16 UTC | |
by fullermd (Priest) on Jan 26, 2011 at 02:21 UTC |
Back to
Seekers of Perl Wisdom