in reply to Re: Inserting 2 arrays into 2 field in MySQL
in thread Inserting 2 arrays into 2 field in MySQL

thanks for your help it worked just a question what does
foreach my $i (0..$#array1);
means?

Replies are listed 'Best First'.
Re^3: Inserting 2 arrays into 2 field in MySQL
by chrism01 (Friar) on May 15, 2008 at 06:04 UTC
Re^3: Inserting 2 arrays into 2 field in MySQL
by ikegami (Patriarch) on May 15, 2008 at 14:47 UTC

    $#array1 returns the last index of the array so that iterates over the indexes of the array. Hopefully, the following example will help you understand:

    my @array = qw( a b c ); for my $i (0..$#array) { print("$i: $array[$i]\n"); }