in reply to Re: problem with evaluating first line in a file
in thread problem with evaluating first line in a file

"Drop empty records, without incrementing the id" would be ideal but it really doesn't matter , because first id is a random number anyway.
  • Comment on Re^2: problem with evaluating first line in a file

Replies are listed 'Best First'.
Re^3: problem with evaluating first line in a file
by ikegami (Patriarch) on Mar 09, 2009 at 15:32 UTC
    my $line; while(<LINES>){ if (m/^--/){ if (defined($line)){ my @data = ( [ $id++, $line ] ); $self->_loaddb(table => 'TABLE', data => \@data); $line = undef; } } else{ chomp; $line .= $_; } }