Re: help to capture the elements, every 8th, followed by 7 elements

2011-01-28 Thread jet speed
On Fri, Jan 28, 2011 at 3:49 PM, Rob Dixon wrote: > On 28/01/2011 15:26, jet speed wrote: > >> Hi All, >> >> I need help on this one please. >> >> I have a input file with the following data. The 7 times 000s i have added >> in the input file in order to start with 1808 as the eight element. whi

Re: help to capture the elements, every 8th, followed by 7 elements

2011-01-28 Thread Rob Dixon
On 28/01/2011 15:26, jet speed wrote: Hi All, I need help on this one please. I have a input file with the following data. The 7 times 000s i have added in the input file in order to start with 1808 as the eight element. which works ok. am sure there is a better way. now once i captre the 8th

Re: help to capture the elements, every 8th, followed by 7 elements

2011-01-28 Thread Shawn H Corey
On 11-01-28 10:26 AM, jet speed wrote: Any help on this would be much appreciated. See `perldoc perlop` and search for /Multiplicative Operators/. Note the binary operator % -- Just my 0.0002 million dollars worth, Shawn Confusion is the first step of understanding. Programming is

help to capture the elements, every 8th, followed by 7 elements

2011-01-28 Thread jet speed
Hi All, I need help on this one please. I have a input file with the following data. The 7 times 000s i have added in the input file in order to start with 1808 as the eight element. which works ok. am sure there is a better way. now once i captre the 8th element ex: 1808, then 1810 so on in the

Re: Redeclaration of variable [different scope]

2011-01-28 Thread Shawn H Corey
On 11-01-27 11:33 PM, Raymond Wan wrote: Oddly enough, when I run B::Xref through my scripts, I get "segmentation faults" I don't know if I'm using it incorrectly -- but on a simple Perl file, it works ok. And of course, it works ok with your one liner above. I get the same thing, even on sma

Re: Redeclaration of variable [different scope]

2011-01-28 Thread Raymond Wan
Hi Charles, On Thu, Jan 27, 2011 at 20:26, C.DeRykus wrote: > On Jan 27, 1:51 am, r@aist.go.jp (Raymond Wan) wrote: >> I was wondering if there is a way for Perl to give me a warning if I >> redeclare a variable in a different scope (and thus masking the outer >> one).  Just spent some time d

Re: Regex

2011-01-28 Thread Mike McClain
On Thu, Jan 27, 2011 at 07:59:41PM +, Rob Dixon wrote: > On 27/01/2011 06:23, Ramesh Kumar wrote: > > > >Hi Rob, > > > >I refer to your 2 lines of code: > > > > my $data = '<{5, 26}{20, 42, 64}{23, 48}>'; > > my $list = [ map { [ $_ =~ /\d+/g ] } $data =~ /(\{.*?\})/g ]; > > > >That's the t