in reply to Re: Perl Array issue.
in thread Perl Array issue.

Hi tobyink , how can I increment $done ? don't you think that my @timestamp array is causing the infinite loop,because without this piece of code it works, how can I make the array stop at the end of the string, Thanks.

Replies are listed 'Best First'.
Re^3: Perl Array issue.
by aaron_baugher (Curate) on May 07, 2012 at 16:43 UTC

    Let's back up a step: what's the purpose of your inner while loop? Is there a reason you might want to insert some records from your input file multiple times? If not, then you don't need that while loop (or $done or $retry). Just loop through your CSV file record by record as you're doing, and for each record, do whatever processing you need to do on the fields and insert it into your database.

    Aaron B.
    My Woefully Neglected Blog, where I occasionally mention Perl.

Re^3: Perl Array issue.
by Anonymous Monk on May 07, 2012 at 16:00 UTC

    ++ is the increment operator. You can also use = to assign a nonzero value if you like.