Re: using substr... is this efficient

2004-02-20 Thread Rob Dixon
Luke Bakken wrote: > > From: Larry Sandwick [mailto:[EMAIL PROTECTED] > > > > I have a scripted I wrote that uses *substr* on a file that has fixed > > fields. I have to parse the file before I upload into MYSQL. > > > > Is there a more efficient way other than *substr*, I looked a > > *pack* and >

RE: using substr... is this efficient

2004-02-20 Thread Bakken, Luke
> -Original Message- > From: Larry Sandwick [mailto:[EMAIL PROTECTED] > > I have a scripted I wrote that uses *substr* on a file that has fixed > fields. I have to parse the file before I upload into MYSQL. > > Is there a more efficient way other than *substr*, I looked a > *pack* and >

Re: using substr... is this efficient

2004-02-20 Thread Rob Dixon
Larry Sandwick wrote: > > I have a scripted I wrote that uses *substr* on a file that has fixed > fields. I have to parse the file before I upload into MYSQL. > > Is there a more efficient way other than *substr*, I looked a *pack* and > *unpack* . it did not make any sense to me. > > Here is my co

RE: using substr... is this efficient

2004-02-20 Thread Paul Kraus
> > Is there a more efficient way other than *substr*, I looked a *pack* and > > *unpack* . it did not make any sense to me. Unpack is what I would use. Perldoc unpack. $item = substr($the_line,0,10); $ldesc= substr($the_line,11,40); $page = substr($the_line,52,6); $d=

using substr... is this efficient

2004-02-20 Thread Larry Sandwick
I have a scripted I wrote that uses *substr* on a file that has fixed fields. I have to parse the file before I upload into MYSQL. Is there a more efficient way other than *substr*, I looked a *pack* and *unpack* . it did not make any sense to me. Here is my code, and any suggestions, comme