Re: Unable to change pos in regex match

2012-08-14 Thread Paul Anderson
Well, now I feel sufficiently stupid:) Thanks! On 2012-08-14, at 6:19 PM, Jim Gibson wrote: > >> > > Have you tried printing out the values of ($1,$2,$3,$4,$5), $cur, and pos > $numb for each iteration? I think you will find it most informative to do so. > > Hint: you should be using a whil

Re: Unable to change pos in regex match

2012-08-14 Thread Jim Gibson
On Aug 14, 2012, at 2:57 PM, Paul Anderson wrote: > I'm working on code to solder the Project Euler problem #8. This is the one > where you have to find the greatest product of any five digits found in order > in a one thousand digit number. It sort of worked briefly. This version > worked(I h

Unable to change pos in regex match

2012-08-14 Thread Paul Anderson
I'm working on code to solder the Project Euler problem #8. This is the one where you have to find the greatest product of any five digits found in order in a one thousand digit number. It sort of worked briefly. This version worked(I had line 25 uncommented): https://github.com/wackyvorlon/mar

Re: Raspberry Pi: Beginners Web App Example

2012-08-14 Thread Bill Stephenson
On Aug 13, 2012, at 2:55 PM, Perforin wrote: > On 08/13/2012 11:57 AM, Shlomi Fish wrote: >> Hello Perforin, >> >> On Mon, 13 Aug 2012 08:18:13 +0200 >> Perforin wrote: >> >>> On 08/13/2012 12:45 AM, Owen wrote: On Fri, 10 Aug 2012 13:41:51 -0500 Bill Stephenson wrote: > So

Re: Raspberry Pi: Beginners Web App Example

2012-08-14 Thread Bill Stephenson
On Aug 12, 2012, at 5:45 PM, Owen wrote: > Love it. Thank you! Sorry, I've been away from my desk for a few days or I would have responded sooner I'm really looking forward to writing a tutorial and commenting the code. After that, I'll spend a little time on the design of the site, but

Re: join each entries in a file

2012-08-14 Thread jet speed
Thanks Shawn, Appreciate your help !! On Tue, Aug 14, 2012 at 12:57 PM, Shawn H Corey wrote: > On Tue, 14 Aug 2012 11:50:14 +0100 > jet speed wrote: > > > i have an @newfa with 50:00:00:08:44:9a:fb:79:90 > > 50:00:00:90:44:9a:fb:30:90 50:00:00:55:44:9a:fb:79:66 and a file as > > below. now i wa

Re: join each entries in a file

2012-08-14 Thread Shlomi Fish
ׁHi jet speed, On Tue, 14 Aug 2012 11:50:14 +0100 jet speed wrote: > Hi Shlomi, > > Thanks for the quick response, appreciate it. > > I modified the code as below and it works. > > foreach $fa(@falist) { > my @parts = $fa =~m/(..)/g; > my $with_colons = join (':', @parts); > push @newfa,$wit

Re: join each entries in a file

2012-08-14 Thread Shawn H Corey
On Tue, 14 Aug 2012 11:50:14 +0100 jet speed wrote: > i have an @newfa with 50:00:00:08:44:9a:fb:79:90 > 50:00:00:90:44:9a:fb:30:90 50:00:00:55:44:9a:fb:79:66 and a file as > below. now i want check if the @newfa entry present in the file if it > exists then i need to print the matching zone: nam

Re: join each entries in a file

2012-08-14 Thread jet speed
Hi Shlomi, Thanks for the quick response, appreciate it. I modified the code as below and it works. foreach $fa(@falist) { my @parts = $fa =~m/(..)/g; my $with_colons = join (':', @parts); push @newfa,$with_colons; } print @newfa; I have one more query, please help i have an @newfa with 50:00

Re: join each entries in a file

2012-08-14 Thread Shlomi Fish
Hi Sj, On Tue, 14 Aug 2012 10:55:13 +0100 jet speed wrote: > Hi All, > > I have a file as below > > file.txt > 5008449AFB7494 > 5008449AFB749C > 5008449AFB779D > > now i want to introduce : inbetween as below for each of these > entries in the file > > 50:00:00:08:44:9A:FB:74:90

join each entries in a file

2012-08-14 Thread jet speed
Hi All, I have a file as below file.txt 5008449AFB7494 5008449AFB749C 5008449AFB779D now i want to introduce : inbetween as below for each of these entries in the file 50:00:00:08:44:9A:FB:74:90 i did come across join function in perl, not sure how to apply inbetween each entries