[32322] in Perl-Users-Digest
Perl-Users Digest, Issue: 3589 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jan 15 09:09:27 2012
Date: Sun, 15 Jan 2012 06:09:09 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 15 Jan 2012 Volume: 11 Number: 3589
Today's topics:
Re: Multiline Search-Replace With Perl One-liner <cibalo@gmx.co.uk>
Re: Multiline Search-Replace With Perl One-liner <jurgenex@hotmail.com>
Re: Multiline Search-Replace With Perl One-liner <tadmc@seesig.invalid>
Re: Multiline Search-Replace With Perl One-liner <ben@morrow.me.uk>
Re: problem reading html stream SOLVED <dave@invalid.invalid>
problem reading html stream <dave@invalid.invalid>
Re: problem reading html stream <ben@morrow.me.uk>
Re: problem reading html stream <bjoern@hoehrmann.de>
Re: problem reading html stream <dave@invalid.invalid>
Re: problem reading html stream <bjoern@hoehrmann.de>
Re: problem reading html stream <ben@morrow.me.uk>
Re: problem reading html stream r.mariotti@fdcx.net
Re: problem reading html stream <dave@invalid.invalid>
Re: problem reading html stream <hjp-usenet2@hjp.at>
Searching Complex Array Values <smilesonisamal@gmail.com>
Re: Searching Complex Array Values <smilesonisamal@gmail.com>
Re: Very slow <hjp-usenet2@hjp.at>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 13 Jan 2012 19:35:11 -0800 (PST)
From: cibalo <cibalo@gmx.co.uk>
Subject: Re: Multiline Search-Replace With Perl One-liner
Message-Id: <83008cea-e0d2-4b47-a8dc-d1d490200df4@iv6g2000pbc.googlegroups.com>
On Jan 12, 8:53=A0pm, Tad McClellan <ta...@seesig.invalid> wrote:
> I will ignore the restriction.
> ---------------------
> #!/usr/bin/perl
> use warnings;
> use strict;
>
> my $html =3D '<html>
> <body>
> <img src=3D"public_html\images\Buster.jpg" height=3D"250" width=3D"128"
> =A0 alt=3D" =A0 =A0 =A0/\ See above"
> =A0 =A0 title=3D" =A0 =A0 =A0/\
> See above" />
> </body>
> </html>
> ';
>
> $html =3D~ s/src=3D"([^"]+)"/ '"' . fix_slash($1) . '"'/ge;
>
> print $html;
>
> sub fix_slash {
> =A0 =A0 my($src) =3D @_;
> =A0 =A0 $src =3D~ tr!\\!/!;
> =A0 =A0 return $src;}
>
> ---------------------
Hello Tad McClellan,
Thank you very much for replying to my post. What I need is a working
solution, be it a one-liner or perl/sed/awk/bash script.
Your solution isn't that applicable to my case, becasue
1. I have many html files
2. All my html codings have to be included in your perl script.
3. Maybe your script can read my html files and modify the img src
path accordingly!
But Thank You Anyway!
Best Regards,
cibalo
------------------------------
Date: Fri, 13 Jan 2012 22:24:24 -0800
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Multiline Search-Replace With Perl One-liner
Message-Id: <pe72h7la2ase0o476svt6iakk9eifdc9i9@4ax.com>
cibalo <cibalo@gmx.co.uk> wrote:
>On Jan 12, 8:53 pm, Tad McClellan <ta...@seesig.invalid> wrote:
>> I will ignore the restriction.
>> ---------------------
>> #!/usr/bin/perl
>> use warnings;
>> use strict;
>>
>> my $html = '<html>
>> <body>
>> <img src="public_html\images\Buster.jpg" height="250" width="128"
>> alt=" /\ See above"
>> title=" /\
>> See above" />
>> </body>
>> </html>
>> ';
>>
>> $html =~ s/src="([^"]+)"/ '"' . fix_slash($1) . '"'/ge;
>>
>> print $html;
>>
>> sub fix_slash {
>> my($src) = @_;
>> $src =~ tr!\\!/!;
>> return $src;}
>>
>
>Thank you very much for replying to my post. What I need is a working
>solution,
That sounds like a job offer to me. This NG is not about job offers.
>Your solution isn't that applicable to my case, becasue
>1. I have many html files
Yes. So? Why does that make Ted's function inapplicable?
>2. All my html codings have to be included in your perl script.
How so? Ted's script suggested nothing of that sort.
>3. Maybe your script can read my html files and modify the img src
>path accordingly!
Guess what? Ted's script is self-contained such that anyone can run and
test the code as is without any further external data or modifications.
That is the most desireable way to post code because nobody else has
your files but you.
Did you even look at his code? Did you even understand the most basic
structure? Or are you really unable to identify the key element that
does all the work and copy-n-paste that piece into your own program?
If that is your problem, then indeed you may want to post a job offer,
but please do so it in a more appropriate NG.
>But Thank You Anyway!
Thank you for your consideration.
jue
------------------------------
Date: Sat, 14 Jan 2012 09:39:16 -0600
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Multiline Search-Replace With Perl One-liner
Message-Id: <slrnjh38pt.fqd.tadmc@tadbox.sbcglobal.net>
cibalo <cibalo@gmx.co.uk> wrote:
> On Jan 12, 8:53Â pm, Tad McClellan <ta...@seesig.invalid> wrote:
>> I will ignore the restriction.
>> ---------------------
>> #!/usr/bin/perl
>> use warnings;
>> use strict;
>>
>> my $html = '<html>
>> <body>
>> <img src="public_html\images\Buster.jpg" height="250" width="128"
>> Â alt=" Â Â Â /\ See above"
>> Â Â title=" Â Â Â /\
>> See above" />
>> </body>
>> </html>
>> ';
>>
>> $html =~ s/src="([^"]+)"/ '"' . fix_slash($1) . '"'/ge;
>>
>> print $html;
>>
>> sub fix_slash {
>> Â Â my($src) = @_;
>> Â Â $src =~ tr!\\!/!;
>> Â Â return $src;}
>>
>> ---------------------
>
> Hello Tad McClellan,
>
> Thank you very much for replying to my post. What I need is a working
> solution, be it a one-liner or perl/sed/awk/bash script.
That is fortunate, as I have given you a working solution to the problem
presented.
> Your solution isn't that applicable to my case, becasue
We are not here to write your program for you.
We are here to help you when you get stuck writing your program.
You were stuck on how to do the substitution, so I have showed you
how to get past doing the substitution.
> 1. I have many html files
Are you saying that you need us to teach you how to open files?
How to write to files?
> 2. All my html codings have to be included in your perl script.
I don't know what "all my html codings" mean when you say it.
What are "all my html codings"?
> 3. Maybe your script can read my html files and modify the img src
> path accordingly!
Maybe **your** script can be made to read your html files and modify the
img src path accordingly.
You either need to learn to program (in which case we've already given
you enough help to complete your task) or you need to hire a programmer
to do it for you.
This is not the place to get programs written to specification for free,
*you* need to write your program and we will help you when you get
stuck.
If what I've provided is missing things that you need, then you should
simply add the things that are missing!
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
------------------------------
Date: Sat, 14 Jan 2012 15:53:27 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Multiline Search-Replace With Perl One-liner
Message-Id: <n0l8u8-lle2.ln1@anubis.morrow.me.uk>
Quoth Jürgen Exner <jurgenex@hotmail.com>:
> cibalo <cibalo@gmx.co.uk> wrote:
> >On Jan 12, 8:53 pm, Tad McClellan <ta...@seesig.invalid> wrote:
<snip>
>
> Yes. So? Why does that make Ted's function inapplicable?
^^^
Come on. You've been here long enough to get that right.
Ben
------------------------------
Date: Sun, 15 Jan 2012 14:01:39 +0000 (UTC)
From: "Dave Saville" <dave@invalid.invalid>
Subject: Re: problem reading html stream SOLVED
Message-Id: <fV45K0OBJxbE-pn2-VHoPi3V2dq2m@localhost>
On Sun, 15 Jan 2012 12:16:08 UTC, "Peter J. Holzer"
<hjp-usenet2@hjp.at> wrote:
<snip>
>
> Do you use HTTP to get the data or some custom protocol?
HTTP - But it would appear to be a problem with perl sockets - Someone
suggested LWP::Simple but that was no good as I needed to process the
files which are large and the server does not have much RAM. So I used
LWP::UserAgent to dump straight to a file which I can then post
process and it works fine. Odd as I would have thought that LWP* would
use sockets at the bottom layer. Ho hum.
Thanks for the help guys.
--
Regards
Dave Saville
------------------------------
Date: Sat, 14 Jan 2012 15:19:19 +0000 (UTC)
From: "Dave Saville" <dave@invalid.invalid>
Subject: problem reading html stream
Message-Id: <fV45K0OBJxbE-pn2-mObB5sY1jDzx@localhost>
I have a perl script that reads a, large, html stream (TV program
data).
I use IO::Socket, do a "my $socket = new" and then a "while (
<$socket>)" to fetch the data.
Now the problem *might* be their end, but it hangs after *exactly*
180K for about 5 minutes and then completes. Firefox pulls the same
data in 10s of seconds. Which, to my thinking, would eliminate any
funnies in libc.
Any thoughts?
TIA
--
Regards
Dave Saville
------------------------------
Date: Sat, 14 Jan 2012 16:03:48 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: problem reading html stream
Message-Id: <4kl8u8-lle2.ln1@anubis.morrow.me.uk>
Quoth "Dave Saville" <dave@invalid.invalid>:
> I have a perl script that reads a, large, html stream (TV program
> data).
>
> I use IO::Socket, do a "my $socket = new" and then a "while (
> <$socket>)" to fetch the data.
>
> Now the problem *might* be their end, but it hangs after *exactly*
> 180K for about 5 minutes and then completes. Firefox pulls the same
> data in 10s of seconds. Which, to my thinking, would eliminate any
> funnies in libc.
>
> Any thoughts?
Not without a bit more detail. Have you tried running tcpdump/wireshark
while the transfer is happening to see if anything peculiar is going on
at the network level? Have you tried [skd]tracing the perl program to
see what's causing it to stop?
Is there anything significant in the data at that point? Does the perl
program do anything besides reading the data and throwing it away? What
happens if you change it so it doesn't? Have you looked at the server
logs to see if anything odd is happening at that end?
Can you reduce the script to a minimal example which will fail when run
against a publically-available server? If you can, post it; if you
can't, what's stopping you? That's likely to be a valuable clue.
Ben
------------------------------
Date: Sat, 14 Jan 2012 17:56:36 +0100
From: Bjoern Hoehrmann <bjoern@hoehrmann.de>
Subject: Re: problem reading html stream
Message-Id: <emc3h7lk1kemat4bi96oi2mekhmlbh8ptj@hive.bjoern.hoehrmann.de>
* Dave Saville wrote in comp.lang.perl.misc:
>I have a perl script that reads a, large, html stream (TV program
>data).
>
>I use IO::Socket, do a "my $socket = new" and then a "while (
><$socket>)" to fetch the data.
>
>Now the problem *might* be their end, but it hangs after *exactly*
>180K for about 5 minutes and then completes. Firefox pulls the same
>data in 10s of seconds. Which, to my thinking, would eliminate any
>funnies in libc.
The error is in what you are not describing, like what <> does in your
code. By default it looks for newlines and there might be none in the
stream after a certain point, and the five minutes might simply be the
timeout where your program gives up waiting for more data.
--
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
------------------------------
Date: Sat, 14 Jan 2012 17:37:50 +0000 (UTC)
From: "Dave Saville" <dave@invalid.invalid>
Subject: Re: problem reading html stream
Message-Id: <fV45K0OBJxbE-pn2-Uqs44y9t1PRZ@localhost>
On Sat, 14 Jan 2012 16:56:36 UTC, Bjoern Hoehrmann
<bjoern@hoehrmann.de> wrote:
<snip>
> The error is in what you are not describing, like what <> does in your
> code. By default it looks for newlines and there might be none in the
> stream after a certain point, and the five minutes might simply be the
> timeout where your program gives up waiting for more data.
It parses the input and writes to a file. It's not a timeout as after
the long wait it carries on to completion. It's processed line by line
and it is not running out of memory or anything like that. The socket
is blocked until some more lines eventually arrive.
One of the URLs I am having problems with is
xmltv.radiotimes.com/xmltv/94.dat
Will try an iptrace but I doubt there is any traffic. It is just so
suspicious that it is *exactly* 180K bytes.
--
Regards
Dave Saville
------------------------------
Date: Sat, 14 Jan 2012 19:31:33 +0100
From: Bjoern Hoehrmann <bjoern@hoehrmann.de>
Subject: Re: problem reading html stream
Message-Id: <o6g3h75nhqies6nuouhdqsf488jprkndd1@hive.bjoern.hoehrmann.de>
* Dave Saville wrote in comp.lang.perl.misc:
>It parses the input and writes to a file. It's not a timeout as after
>the long wait it carries on to completion. It's processed line by line
>and it is not running out of memory or anything like that. The socket
>is blocked until some more lines eventually arrive.
>
>One of the URLs I am having problems with is
>xmltv.radiotimes.com/xmltv/94.dat
>
>Will try an iptrace but I doubt there is any traffic. It is just so
>suspicious that it is *exactly* 180K bytes.
My guess is that you are trying to read a HTTP response via IO::Socket
and that does not work because you are expecting that while(<$socket>)
knows when it read the "last line" but there is no such thing in HTTP.
--
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
------------------------------
Date: Sat, 14 Jan 2012 18:48:40 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: problem reading html stream
Message-Id: <89v8u8-1bh2.ln1@anubis.morrow.me.uk>
Quoth "Dave Saville" <dave@invalid.invalid>:
>
> One of the URLs I am having problems with is
> xmltv.radiotimes.com/xmltv/94.dat
That's not a URL.
Ben
------------------------------
Date: Sat, 14 Jan 2012 19:28:24 -0500
From: r.mariotti@fdcx.net
Subject: Re: problem reading html stream
Message-Id: <bb74h7t803qsokluo0nou1cjpqol808e1a@4ax.com>
On Sat, 14 Jan 2012 15:19:19 +0000 (UTC), "Dave Saville"
<dave@invalid.invalid> wrote:
>I have a perl script that reads a, large, html stream (TV program
>data).
>
>I use IO::Socket, do a "my $socket = new" and then a "while (
><$socket>)" to fetch the data.
>
>Now the problem *might* be their end, but it hangs after *exactly*
>180K for about 5 minutes and then completes. Firefox pulls the same
>data in 10s of seconds. Which, to my thinking, would eliminate any
>funnies in libc.
>
>Any thoughts?
>
>TIA
Perhaps the IO::Socket module is not your best bet.
I do something similar and I use LWP::Simple. Streams come right in
at full bandwith speed.
Good luck
------------------------------
Date: Sun, 15 Jan 2012 11:33:00 +0000 (UTC)
From: "Dave Saville" <dave@invalid.invalid>
Subject: Re: problem reading html stream
Message-Id: <fV45K0OBJxbE-pn2-O2JmZ4MTs3fF@localhost>
On Sun, 15 Jan 2012 00:28:24 UTC, r.mariotti@fdcx.net wrote:
> On Sat, 14 Jan 2012 15:19:19 +0000 (UTC), "Dave Saville"
> <dave@invalid.invalid> wrote:
>
> >I have a perl script that reads a, large, html stream (TV program
> >data).
> >
> >I use IO::Socket, do a "my $socket = new" and then a "while (
> ><$socket>)" to fetch the data.
> >
> >Now the problem *might* be their end, but it hangs after *exactly*
> >180K for about 5 minutes and then completes. Firefox pulls the same
> >data in 10s of seconds. Which, to my thinking, would eliminate any
> >funnies in libc.
> >
> >Any thoughts?
> >
> >TIA
>
> Perhaps the IO::Socket module is not your best bet.
>
> I do something similar and I use LWP::Simple. Streams come right in
> at full bandwith speed.
>
It behaves, or misbehaves, with socket and io::socket - but I suppose
it would the latter being a wrapper for the former. Never thought of
LWP::Simple as it is not really an HTML page - just data.
The point several of you seem to have missed is that after the hang at
180K for minutes the stream resumes with no missing data. I ran an
iptrace and that showed damn all during the hang. I really think it
must be the server end - which I have nothing to do with. I have also
run my code against my own server, although not with such a big file,
but "normal" HTML pages and it works just fine.
--
Regards
Dave Saville
------------------------------
Date: Sun, 15 Jan 2012 13:16:08 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: problem reading html stream
Message-Id: <slrnjh5gs8.sg5.hjp-usenet2@hrunkner.hjp.at>
On 2012-01-15 11:33, Dave Saville <dave@invalid.invalid> wrote:
> On Sun, 15 Jan 2012 00:28:24 UTC, r.mariotti@fdcx.net wrote:
>> On Sat, 14 Jan 2012 15:19:19 +0000 (UTC), "Dave Saville"
>> <dave@invalid.invalid> wrote:
>>
>> >I have a perl script that reads a, large, html stream (TV program
>> >data).
>> >
>> >I use IO::Socket, do a "my $socket = new" and then a "while (
>> ><$socket>)" to fetch the data.
>> >
>> >Now the problem *might* be their end, but it hangs after *exactly*
>> >180K for about 5 minutes and then completes. Firefox pulls the same
>> >data in 10s of seconds. Which, to my thinking, would eliminate any
>> >funnies in libc.
>>
>> Perhaps the IO::Socket module is not your best bet.
>>
>> I do something similar and I use LWP::Simple. Streams come right in
>> at full bandwith speed.
>>
>
> It behaves, or misbehaves, with socket and io::socket - but I suppose
> it would the latter being a wrapper for the former. Never thought of
> LWP::Simple as it is not really an HTML page - just data.
Do you use HTTP to get the data or some custom protocol?
hp
--
_ | Peter J. Holzer | Deprecating human carelessness and
|_|_) | Sysadmin WSR | ignorance has no successful track record.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ | -- Bill Code on asrg@irtf.org
------------------------------
Date: Sat, 14 Jan 2012 22:31:38 -0800 (PST)
From: Pradeep Patra <smilesonisamal@gmail.com>
Subject: Searching Complex Array Values
Message-Id: <8fa546c3-4dcb-45ad-a9df-d60771f2c40d@3g2000pbg.googlegroups.com>
Hi all,
I have a complex array reference. I want to search the
'name'="v1" and if it matches then search for "ctrs" and then 'C-data'
get the value of "success"?
$VAR1 = [
#0
{
'timestamp' => '1020929',
'inst' => [
#0
{
'A-data' => [
#0
{
'C' => [
#0
{
'B-data' => [
#0
{
'c-count' => '8',
'result' => 'complete'
}
]
}
],
'name' => 'v1',
'id' => 'v1',
'ctrs' => [
#0
{
'C-
data' => [
#0
{
'value' => '0',
'name' => 'success'
},
#1
{
'value' => '0',
'name' => 'error'
},
#2
{
'value' => '0',
'name' => 'percent'
},
#3
{
'value' => '0',
'name' => 'latency'
},
#4
{
'value' => '0',
'name' => 'total'
},
]
}
]
}
]
}
]
}
];
I am trying to retrieve as following But it doesn't work. Am I missing
anything in dereferencing I guess. A sample source code will help.
my $a = $VAR1[0]; ---> To get "inst"
my $b = $a->{'A-data'};
print "A is $a";
print "B is $b";
if ($b->{'name'} eq 'v1') {
print "PASS";
}
Is there a efficient way of searching this kind then it will be
useful?
Regards
Pradeep
------------------------------
Date: Sun, 15 Jan 2012 03:42:44 -0800 (PST)
From: Pradeep Patra <smilesonisamal@gmail.com>
Subject: Re: Searching Complex Array Values
Message-Id: <83315676-ead5-43c5-8adc-03d9c00c692f@f11g2000yql.googlegroups.com>
T24gSmFuIDE1LCAxMTozMaBhbSwgUHJhZGVlcCBQYXRyYSA8c21pbGVzb25pc2EuLi5AZ21haWwu
Y29tPiB3cm90ZToKPiBIaSBhbGwsCj4goCCgSSBoYXZlIGEgY29tcGxleCBhcnJheSByZWZlcmVu
Y2UuIEkgd2FudCB0byBzZWFyY2ggoHRoZQo+ICduYW1lJz0idjEiIGFuZCBpZiBpdCBtYXRjaGVz
IHRoZW4gc2VhcmNoIGZvciAiY3RycyIgYW5kIHRoZW4gJ0MtZGF0YScKPiBnZXQgdGhlIHZhbHVl
IG9mIKAic3VjY2VzcyI/Cj4KPiAkVkFSMSA9IFsKPiCgIKAgo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lIHNvbWUgcG9pbnRlcnMgaG93IGNhbgp3ZSBlZmZlY3Rp
dmVseSBmYXN0ZW4gdGhlIHNlYXJjaD8=
------------------------------
Date: Fri, 13 Jan 2012 12:14:08 +0100
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Very slow
Message-Id: <slrnjh04g2.7j8.hjp-usenet2@hrunkner.hjp.at>
On 2012-01-12 21:26, George Mpouras <nospam.gravitalsun@hotmail.com.nospam> wrote:
> this is not the case. The is code is correct for both slow and fast
> versions.
Nope. It ignores a , in the first column. So for your test data it
reports 50 columns instead of 51.
hp
--
_ | Peter J. Holzer | Deprecating human carelessness and
|_|_) | Sysadmin WSR | ignorance has no successful track record.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ | -- Bill Code on asrg@irtf.org
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 3589
***************************************