Hi,how about this? my @array = $data =~ /\((\d+)\)/g;
-----Original Message----- >From: john wright <[EMAIL PROTECTED]> >Sent: Sep 5, 2006 11:29 AM >To: beginners@perl.org >Subject: Extract digits from string > >Hi, > I have a data in a variable like > $data="book(18614)---book2.2(18616)---book3(18617)---book4(14432) ......... > so on" > i want to store all digit value lying between ( ) into an array. > $array[0]=18614 > $array[1]=18616 > $array[2]=18617 ... so on > > Can someone help please? > Thanks > > >--------------------------------- > All-new Yahoo! Mail - Fire up a more powerful email and get things done > faster. -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>