in reply to Splitting on Variable

If the user-specified delimiter is expected to always be a single character, then you might want to refer to this excellent node by tilly, his "Text:xSV" module, which does this sort of thing very nicely.

(On the other hand, if delimiters could include things like "::" or "\s+//\s+", etc, and you're confident that you don't need to worry about embedded/escaped occurrences of the delimiter pattern within data fields, then just make sure that $self->{delimiter} is defined and non-empty, and proceed with your own solution...)