Janek Schleicher wrote: > > Jimstone7 wrote at Thu, 27 Mar 2003 06:39:25 -0500: > > > $data = "David (man from uncle)"; > > > > $data = "John Doe (The boy down the hall)"; > > > > What I want to do is split $data into two string variables, one holding the > > $name, and the other holding all the $info that is within the parens. How > > would I do this? Thanks for any help. > > I would use a regexp: > > my ($name, $info) = $data =~ /(.*?)\w+\((.*)\)/;
I guess you ment: my ($name, $info) = $data =~ /(.*?)\s*\((.*)\)/; /Stefan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]