in reply to @forminputs annoying error

You mean apart from that @header is not equal to @forminputs?
Check and see where are you defining @forminputs...

It would help if you posted a bit of your original code, maybe from lines 230 through 240...

#!/home/bbq/bin/perl
# Trust no1!

Replies are listed 'Best First'.
RE: Re: @forminputs annoying error
by damian (Beadle) on May 09, 2000 at 07:43 UTC
    thanks but i think i found my mistake.... i have this line... print<<"EOT"; .... couple of html codes here .... EOT; -> this is the error it should be EOT only. but it does'nt make sense, PERL display's an error which is somehow not related to the real error. thanks anyway
      Beleive me when I say that it probably makes sense. 99% of the times that I catch myself saying things like "Stupid machine, its not supposed to!", I'll be biting my tongue later on with a big Homer Simpson "DOH!". Perl isn't tricky, its just flexible. Once you get past that stage then you'll be laughing at your own mistakes and making a habit of runnin -c.

      In the meanwhile... Each person has his/her own method of defining HTML, but I like doing the following:
      my $variables = '1 2 3'; my @arrays = (4, 5, 6); my $html = qq{ <html> <head> <!-- your head stuff --> </head> <body etc, et al> More stuff with <font face="Verdana, Arial, Sans-Serif">$variables and + @arrays</font> and things of the sort. </body> </html> }; print $html;
      I rarely use { or } characters in my HTML, and even if I do, they are usually in Javascript or CSS which get imported as .js or .css files, so I never have to worry about literalizing(?) any special characters. I hope that helps as a future suggestion.

      #!/home/bbq/bin/perl
      # Trust no1!
      Sometimes that extra semicolon can really mess you up...

      You must have had another EOT somewhere in the file, because it should have given you one of these: Can't find string terminator "EOT" anywhere before EOF at ... So between the first terminating EOT and the second terminating EOT you had the @forminputs variable and perl thought you wanted to print the variable name along with all the other code in between.

      That's why it's helpful to give your here-document labels different names each time, like:

      print <<EOT1; EOT1 print << EOT2; EOT2
      That way if you accidentally put a semicolon on the end of one you'll immediately know where to look because you'll get the error above instead of some other crazy errors.