[EMAIL PROTECTED] wrote:
> 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
>
> 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.
hmm...close, but not quite there. I think you want this:
splice( @sample, 9, 0, @{$add_to[$i]} );
$add_to[$i] is a reference to the sub-array.
@{$add_to[$i]} is the sub-array itself.
--
Bowie
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs