sigh, i misunderstood how mysql was escaping newline and tab. the following code properly reads the file output by mysqldump (although it may not be the most efficient):
my $line = ''; while (<$in>) { $line .= $_; next if m/\\$/; chomp $line; my @cols = (''); my @tabs = split /\t/, $line; foreach (@tabs) { $cols[$#cols] =~ m/\\$/ and do { $cols[$#cols] .= "\t$_"; next; }; push @cols, $_; } shift @cols; <processing done here> $line = ''; }
In reply to Re: mysqldump files -- SOLVED
by rhumbliner
in thread mysqldump files
by rhumbliner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |