You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Scott Chapman <sc...@mischko.com> on 2002/04/13 00:31:26 UTC

Can't use string ("1") as an ARRAY ref while "strict refs"

Below is the the relevant snippet of my .epl page which gives me an error.  
How do I deal with this?  I don't think I have a very elegant solution here. If 
anyone has some better idea, please send it my way.

Error:

23863]ERR: 24: Error in Perl code: Can't use string ("1") as an ARRAY ref 
while "strict refs" in use at /www/htdocs/reviews/scott-
rdwucgnm/analyst/tc1.epl line 160.

Apache/1.3.23 (Unix) mod_perl/1.26 HTML::Embperl 2.0b5 [Fri Apr 12 
15:56:32 2002]

EPL section:

    # Get the row order and names from the table
    $sth = $req->{tcdb}->prepare ("SELECT order,name FROM pages ORDER 
BY order");
    $sth->execute();
    @row_array = $sth->fetchrow_array;

-]
<html>
<head>
</head>
<body>

<form>
  <select name="test">
    <OPTION VALUE="[+ $row_array[0][$row] +]">[+ $row_array[1][$row] 
+]</OPTION>
  </select>
...
..
</form>

Thanks!
Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org