perl question with socket

2011-10-10 Thread 谢成骏
I just type after but it doesn't work like the book tell me. this is the two file, and I run the server.pl in my server and run client.plwith this command: client.pl localhost:2007 when I run the client.pl, the server.pl can return a message to tell me there is a client connected. But, I type anyt

Re: regex help

2011-10-10 Thread John Delacour
At 14:56 -0500 10/10/11, Chris Stinemetz wrote: Once I match HEH how can alter the program to print the contents that are in the two lines directly above the match? If it's only one instance you need to deal with then this should do the trick: #!/usr/bin/perl use strict; my @lines; while ()

Re: regex help

2011-10-10 Thread Shawn H Corey
On 11-10-10 03:56 PM, Chris Stinemetz wrote: Any help is appreciated. Once I match HEH how can alter the program to print the contents that are in the two lines directly above the match? For example in this case I would like the print results to be: **01 REPT:CELL 983 CDM 1, CCU 1, CE 5, HEH

Re: regex help

2011-10-10 Thread John W. Krahn
Chris Stinemetz wrote: Any help is appreciated. It looks like you don't need "regex help". Once I match HEH how can alter the program to print the contents that are in the two lines directly above the match? For example in this case I would like the print results to be: **01 REPT:CELL 983

Re: regex help

2011-10-10 Thread Chris Charley
"Chris Stinemetz" wrote in message Any help is appreciated. Once I match HEH how can alter the program to print the contents that are in the two lines directly above the match? For example in this case I would like the print results to be: **01 REPT:CELL 983 CDM 1, CCU 1, CE 5, HEHTimest

Re: regex help

2011-10-10 Thread Brian Fraser
On Mon, Oct 10, 2011 at 4:56 PM, Chris Stinemetz wrote: > Any help is appreciated. > > Once I match HEH how can alter the program to print the contents that > are in the two lines directly above the match? > > For example in this case I would like the print results to be: > > **01 REPT:CELL 983 C

regex help

2011-10-10 Thread Chris Stinemetz
Any help is appreciated. Once I match HEH how can alter the program to print the contents that are in the two lines directly above the match? For example in this case I would like the print results to be: **01 REPT:CELL 983 CDM 1, CCU 1, CE 5, HEHTimestamp: 10/10/11 00:01:18 #!/usr/bin/per

RE: Matching Greek letters in UTF-8 file

2011-10-10 Thread Hamann, T.D. (Thomas)
Many thanks for the replies. Reading the documentation, it looks like it's a bit more complicated than I had hoped. On the other hand, I realized that for my purpose (removing unwanted hyphens from an OCR'ed document), I don't actually need to match the greek letters, because they occur in two