ascetic has asked for the wisdom of the Perl Monks concerning the following question:
I want to break this string into a three elements...$str = 'sue,fred,x(mary,jane)';
['sue','fred','x(mary,jane)']
where, 'mary' and 'jane' are two args of function x which I am going to resolve by processing the third item later on
Not four elements...I have tried several ideas like splitting and then recombining adjacent elements that should not have been split, but was hoping for a cleaner solution.['sue','fred','x(mary','jane)']
|
|---|