robertw has asked for the wisdom of the Perl Monks concerning the following question:

use Acme::Comment type=>'B', own_line=>1; @userinput= <STDIN> /* #my @a = ( "2-S","3-S","4-S","5-S","6-S","7-S","8-S","9-S","10-S","11-S","1 +2-S","13-S","14-S", "2-H","3-H","4-H","5-H","6-H","7-H","8-H","9-H","10-H","11-H","1 +2-H","13-H","14-H", "2-R","3-R","4-R","5-R","6-R","7-R","8-R","9-R","10-R","11-R","1 +2-R","13-R","14-R", "2-K","3-K","4-K","5-K","6-K","7-K","8-K","9-K","10-K","11-K","1 +2-K","13-K","14-K" ); my @a = ( "2","3","4","5","6","7","8","9","T","J","Q","K","A" ,"2","3","4","5","6","7","8","9","T","J","Q","K","A", "2","3","4","5","6","7","8","9","T","J","Q","K","A", "2","3","4","5","6","7","8","9","T","J","Q","K","A" ); */ @n = ("2","3","4","5","6","7","8","9","T","J","Q","K","A");

getallcombos.pl:27: Array found where operator expected at end of line getallcombos.pl:27: syntax error near "@n "

I got these errors because of the */ not being fully recognized as a comment indicator. Everything before is commented, however the */ prevents the rest of the code from being succesfully executed, what can i do about this?

Replies are listed 'Best First'.
Re: Acme::Comment problem
by davido (Cardinal) on Jul 10, 2012 at 08:06 UTC

    So let's say you take the snippet you posted above; all 25 lines. Add that semicolon after <STDIN>, and then execute the code. That exact snippet (with the semicolon fixed) fails for you?

    I have to ask, because I tried just that; I downloaded your code, fixed the semicolon, and gave it a spin. It worked fine. I'm unable to duplicate the error message you're identifying when I run your code.


    Dave

      That worked, it seems I made a very strange mistake:S Thank you
Re: Acme::Comment problem
by toolic (Bishop) on Jul 10, 2012 at 00:41 UTC
    @userinput= <STDIN>
    You have a missing semicolon. What happens if you add it?
    @userinput= <STDIN>; # ^ # --------
      It still gives me getallcombos.pl:wherever i placed the "*)": Array found where operator expected at end of line