in reply to split one file into many on finding a new line
A similar method would also work if you have a more complicated delimiter, such as (for instance), an email address and name, but not an email and website.if ($line =~ /CREATE TABLE/) { close (FILE) ($filename) = $line =~ /CREATE TABLE ([\S]*)/; open (FILE, >$filename); }
|
|---|