> Hi Hubert, > > this is the small script which extracts anything between > 2 "(" and ")" brackets. It maybe useful for others to > know thats why sending it to mailing list.
Eak, I forgot that academics can make a simple problem into something much more complicated... ;) Perl incorporates one of the most powerful Regular Expression engine in existance. You can extract what's between those brackets VERY quickly using: my $unbracketed = $bracketed =~ /\(.*\)/; I love laziness - perhaps that is why I'm a student :D Jonathan Paton NB: The algorithm you showed is useful for compiled languages, but not in Perl. Since perl has to turn your code into bytecode instructions and execute them one by one, the overhead is greater than the benifit from the algorithm. If you find you are doing something simple in many lines there is likely to be a better Perlish way. TIMTOWTOI. __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]