in reply to Re^2: Split up file depending unique values 1st column
in thread Split up file depending unique values 1st column

If you really want shorter code then:
use warnings; use strict; /^([^,]+)/ && open F, ">>$1" and print F while <>; __END__
:-) The way it works is that it opens a file in append mode for every line that matches the regular expression using the first field as the file name and prints the current line to the end of that file.

Replies are listed 'Best First'.
Re^4: Split up file depending unique values 1st column
by GertMT (Hermit) on Dec 17, 2006 at 19:20 UTC
    awesome!
    And with the explanation I even do understand the grammar of this one (line).