in reply to How to read batches of SQL from a file in Perl
You can also make the iterator a little simpler by changing the record separator:
The disadvantage is that $/ can't be a regex, so you can't handle upper/lower case, for example.local $/="\ngo\n"; while(<IN>) { chomp; # now the entire statement is in $_... ... execute the SQL statement, with error checking, etc. }
Michael
In Section
Cool Uses for Perl