In a message dated 3/9/2006 3:36:09 P.M. Eastern Standard Time, [EMAIL PROTECTED] writes:
 
> I know I'm doing this wrong, but I *don't* know the right way...
>
> my @row_proto = (
>    "    <TD class=xc01>$pn</TD>",   # col.0
>    '    <TD class=xd01></TD>',      # col.1
>    '    <TD class=xd01></TD>',      # col.2
>    '    <TD class=xd01></TD>',      # col.3
>    '    <TD class=xd01></TD>',      # col.4
>    '    <TD class=xd01></TD>',      # col.5
>    '    <TD class=xd01></TD></TR>', # col.6
>    '  <TR>'                         # "Next" <TR> header
> );
>
> $add_to[$i]     =  [EMAIL PROTECTED];   # create new @new_xx_rows member
> $add_to[$i][$j] =~ s{><}           # insert column data
>                     {>$pv<};
>
> splice( @sample, 9, 0, @add_to[$i] );   # HERE THERE BE ERROR 
@add_to[$i] is an array slice that evaluates to a list containing a single
element -- the i-th element.   it is equivalent to the more familiar (and preferable)
$add_to[$i].
 
> where @sample is an HTML table read into an array.  In other words,
> I want to insert the $i-th element (sub-array) of @add_to into @sample.
> I keep fumbling around and getting nowhere.
>
> HALP?!
>
> Thanks....
>
> Deane (Still tripping over the easy stuff)
 
deane --  
 
i'm not quite sure what you're after here, but my guess is that you want to get the
elements of the anonymous array that is referenced by the i-th element of the
@add_to array and splice them into the @sample array.   if so, try this:  
 
    splice( @sample, 9, 0, @{ $add_to[$i] } );   # hopefully, this works
 
$add_to[$i] evaluates to a reference to an array.  
@{ $add_to[$i] } de-references that array reference.  
 
hth -- bill walters  
 
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to