|
|
|
|
|
|
| Author |
Message |
Carl Lafferty *nix forums beginner
Joined: 16 Jul 2006
Posts: 10
|
Posted: Wed Jul 19, 2006 4:16 am Post subject:
Re: Net::Telnet - Library Application
|
|
|
| Quote: | /$sdelim(? .{26}?)$edelim$/
I am going to have to do some work on regex's. . Kinda rudimentary
understanding of it at best and that completely LOST me.
|
OK, I did some quick reading. I have found out a few things.
1. I can use /.{59}/ to grab 59 characters at a time
2. it didn't work immediately till I read deeper into net::telnet and
found the prematch option on getting my info I think that may solve a
few of my problems.
3. My library (I have worked here since 92) will often have many copies
of a book, each one generating a different item. Checking availability
for each book generates x*59 bytes of data which the company that
supplies our server THEN delimits with (you guessed it) \x8f.
The result is that right before the availability line there is a line
that (among other things) tells me how many availability lines there
are. Now if I get say 3 lines each line is 59 chars long BUT on the
second line one of them will be that stinking \x8f.
6.5:1116 00183 003
6.7: 003
7 F ROWLING IN FCPL Fiction
7.1 Length of info is 59
7.2 prematch is
7 F ROWLING Due:01-May-06 FCPL Fictio
7.1 Length of info is 59
7.2 prematch is
7 nF ROWLING Due:26-Mar-04 FCLB Ficti
7.1 Length of info is 59
7.2 prematch is
line 6.7 is the line that tells me how many are available (harry potter
and sorcerers stone if anyone is interested) Not that the first 7 has
Fiction spelled out, the next 7 line has Fictio and the next one has
Ficit. The third 7 line has the 'n' from the previous line.
I *think* I can fix it with a kludge of my own but ... well it's late
and that is my progress report.
in the end, sleep wins.. |
|
| Back to top |
|
 |
Carl Lafferty *nix forums beginner
Joined: 16 Jul 2006
Posts: 10
|
Posted: Wed Jul 19, 2006 3:03 pm Post subject:
Re: Net::Telnet - Library Application
|
|
|
Carl Lafferty wrote:
| Quote: | I *think* I can fix it with a kludge of my own but ... well it's late
and that is my progress report.
|
OK, I did fix it. I took the length of the string I expect, multiplied
by how many and subtracted the number of \x8f's I was going to get
(which is the same as the number I expect minus 1, grab that, split on
the \x8f's and done.
Now to take this and turn it into a reasonable facsimile of an online
card catalog that accesses our database directly.
I love linux/perl when it can save so much $$$$.
Thanks for all the help I got here. I learned a LOT about regex and
more about perl in general.
--
Carl Lafferty |
|
| Back to top |
|
 |
robic0@nirgendwo *nix forums Guru
Joined: 10 Nov 2005
Posts: 701
|
Posted: Thu Jul 20, 2006 11:42 pm Post subject:
Re: Net::Telnet - Library Application
|
|
|
On Mon, 17 Jul 2006 03:04:37 -0700, Joe Smith <joe@inwap.com> wrote:
| Quote: | Stephan Titard wrote:
robic0 escribió:
759 lines
I have used for years the telnet module and never experienced any problem
Did you _HAVE_ to quote the entire article? All 759 lines of it?
|
This is a late post.
All 759 lines of "it" constitutes all of about 30k.
Whats the problem with quoting all 30k 20 or more times?
That might give you 2/3 of a megabyte to download.
Stay off the ng's because each nominal message is about 4,000 lines of uuenc.
Something your immature ass does'ent know about.
robic0 |
|
| Back to top |
|
 |
robic0@nirgendwo *nix forums Guru
Joined: 10 Nov 2005
Posts: 701
|
Posted: Thu Jul 20, 2006 11:48 pm Post subject:
Re: Net::Telnet - Library Application
|
|
|
On Wed, 19 Jul 2006 11:03:39 -0400, Carl Lafferty <laff7430@bellsouth.net> wrote:
| Quote: | Carl Lafferty wrote:
I *think* I can fix it with a kludge of my own but ... well it's late
and that is my progress report.
OK, I did fix it. I took the length of the string I expect, multiplied
by how many and subtracted the number of \x8f's I was going to get
(which is the same as the number I expect minus 1, grab that, split on
the \x8f's and done.
Now to take this and turn it into a reasonable facsimile of an online
card catalog that accesses our database directly.
I love linux/perl when it can save so much $$$$.
Thanks for all the help I got here. I learned a LOT about regex and
more about perl in general.
|
I admit, have not read your problem from the beginning.
I know you can use Net::Telnet as a pseudo socket communication device
with the added bennifit of inline trigger callbacks.
I would consider myself an expert on such items. Would your company like
to contract to me for definative hard solution?
Would be the best thing.
robic0 |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Mon Dec 01, 2008 9:30 pm | All times are GMT
|
|
Massage Classes | Loans | Problem Mortgage | Mobile Phones | MPAA
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|