RE: New Guy Questions

2004-03-02 Thread Brian Michalk
> > BM> Of course I know regexes are evil, index() is much better in > performance, > BM> but it still doesn't solve what I am truly after, and that is > a select() > BM> that returns when a complete line of data is available, not just a few > BM> characters. > > would it be possible for you to swi

Re: New Guy Questions

2004-03-02 Thread Bruce McKenzie
At 06:58 AM 3/1/2004, Brian Michalk wrote: The root of the problem is that I need to use something like select() to tell me when there is data without blocking the entire process. Some data comes in character at a time whereas others come in line at a time. The problem is that select() doesn't pla

RE: New Guy Questions

2004-03-02 Thread Brian Michalk
> -Original Message- > From: Jochen Stenzel [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 02, 2004 3:06 AM > To: Brian Michalk > Cc: Rocco Caputo; [EMAIL PROTECTED] > Subject: Re: New Guy Questions > > > > Hello, Brian, > > BM> while (

Re: New Guy Questions

2004-03-02 Thread Jochen Stenzel
Hello, Brian, BM> while ($$data =~ s/^(.*?\n)//) { $self->>process_command($1); BM> } BM> That little regex in there is killing my performance. If one uses select, BM> one must expect to read partial or multiple lines. That means that one must BM> search for line terminators, and that

RE: New Guy Questions

2004-03-01 Thread Brian Michalk
] > Sent: Monday, March 01, 2004 4:46 PM > To: Brian Michalk > Subject: Re: New Guy Questions > > > On Mon, Mar 01, 2004 at 08:58:43AM -0600, Brian Michalk wrote: > > I have a base class that abstracts out a lot of file handle > handling. It > > manages, FIFOs, soc

New Guy Questions

2004-03-01 Thread Brian Michalk
I have a base class that abstracts out a lot of file handle handling. It manages, FIFOs, sockets, STDIO, and reading of device drivers. The root of the problem is that I need to use something like select() to tell me when there is data without blocking the entire process. Some data comes in char