<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3020" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN 
class=707141916-02012007>Where did you declare @records?&nbsp; I can't see that 
in your code below but "my $record" could have been a typo and should read "my 
@records".&nbsp; You get that error in Perl when you try to use a variable that 
is not declared (under use strict;) or the declared variable is then used 
outside of its lexical scope.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN 
class=707141916-02012007></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial size=2><SPAN 
class=707141916-02012007>Leandro</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=707141916-02012007></SPAN></FONT>&nbsp;</DIV><FONT face=Arial 
color=#0000ff size=2></FONT><FONT face=Arial color=#0000ff size=2></FONT><FONT 
face=Arial size=2></FONT><BR>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> Will Smith [mailto:willbelair@yahoo.com] 
  <BR><B>Sent:</B> Tuesday, January 02, 2007 16:54<BR><B>To:</B> The elegant MVC 
  web framework<BR><B>Subject:</B> Re: [Catalyst] Create multiple 
  records<BR></FONT><BR></DIV>
  <DIV></DIV>happy new year to all of you.<BR><BR>thanks all for your support. 
  Back to the question, (which I guess, will irritate some catalyst/perl gurus - 
  but please be patient for learners), I've been able to add multiple records 
  with "PRE" assigned values. But that's not my purpose. I need to add multiple 
  rows that have the same name on the html. I tried several ways, but none was 
  good.<BR><BR>my $book;<BR>my $record; <BR>foreach $book ( 
  @{$c-&gt;request-&gt;params-&gt;{book}}){<BR>&nbsp; <BR>&nbsp;&nbsp;&nbsp; 
  push&nbsp; @records, {title =&gt; $book, price =&gt; $price 
  };<BR>&nbsp;&nbsp;&nbsp; };<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp; eval{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
  $c-&gt;model('bookDB::Book')-&gt;create($_) foreach 
  (@records);<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; };<BR><BR>---- this gives me 
  the compling error: Global symbol "@records" requires explicit package 
name<BR></BLOCKQUOTE></BODY></HTML>