[9743] in Perl-Users-Digest
Perl-Users Digest, Issue: 3337 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 4 05:06:42 1998
Date: Tue, 4 Aug 98 02:00:28 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 4 Aug 1998 Volume: 8 Number: 3337
Today's topics:
ActivePerl and TK - buttons not working <Philip.Bowman@removethisbit.usa.net>
Re: Array or hash question ? (Patrick Timmins)
Re: cgi.pm and upload <ryan@steelplan.com.au>
Re: comp.lang.perl.announce redux (Miguel Cruz)
Re: comp.lang.perl.announce redux <jimbo@soundimages.co.uk>
Re: comp.lang.perl.announce redux <Harald.Joerg@mch.sni.de>
Re: Good Book? <jimbo@soundimages.co.uk>
Re: Has anyone used the POP3 module ? (-)
Re: help help help please!!!! greene@gucc.org
HELP ME please !!! <Karolien.Vanstraelen@tvd.be>
Re: help with string problem <Brettl@datent.com>
Re: hiding user input (Miguel Cruz)
Re: hiding user input <jimbo@soundimages.co.uk>
Re: hiding user input <sp@m.block>
Re: How to extrat characters from string (Craig Berry)
Re: Piping mail to a script that splits off attachments (-)
Re: random number (-)
Security in PERL <markus@ANTISPAM.workmail.com>
Setting timeout? (Patrick Clauberg)
Re: Setting timeout? <wd@uebemc.siemens.de>
Taking out sections of a file? How do I do this? (Andrew Collington)
Re: WANTED: Perl Autoreponder - Any Takers? <wd@uebemc.siemens.de>
Re: WANTED: Perl Autoreponder - Any Takers? <Tony.Curtis+usenet@vcpc.univie.ac.at>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 4 Aug 1998 09:14:47 +0100
From: "Philip Bowman" <Philip.Bowman@removethisbit.usa.net>
Subject: ActivePerl and TK - buttons not working
Message-Id: <902218574.2657.0.nnrp-09.c2de775f@news.demon.co.uk>
I have just downloaded the new ActivePerl distribution, and managed to
install the TK package with the PPM program. However, when I run my only TK
app (a TK-enabled fortune), and some of the demos that come with the
package, many of the buttons only work occasionally (i.e. I press them, they
pop in and out as I click, but the action doesn't happen). Every so often,
the button actually _does_ work, suggesting that there isn't a problem with
the actual code (which there shouldn't be with the demos, at least).
Any suggestions?
Thanks, Phil Bowman
------------------------------
Date: Tue, 04 Aug 1998 06:35:50 GMT
From: ptimmins@netserv.unmc.edu (Patrick Timmins)
Subject: Re: Array or hash question ?
Message-Id: <6q6a47$5dr$1@nnrp1.dejanews.com>
In article <6q56dh$23h$1@nnrp1.dejanews.com>,
jlafosse@my-dejanews.com wrote:
> I have read through the postings, as well as the perl manpages, however I am
> still confused on how to solve the following problem. Basically I am pulling
> in rows from an SQL database, and I want to be able to place these into an
> array. For example the following variables will be pulled out of each row
> (and the amount of rows returned will vary):
>
> $itemNum, $price, $description, $size, $color
>
> So lets say I have three rows returned with the following data:
>
> row1
> $itemNum = 'SKU_1';
> $price = '30.00';
> $description = 'Widget';
> $size = '10';
> $color = 'Blue';
>
> row2
> $itemNum = 'SKU_3';
> $price = '20.00';
> $description = 'Widget';
> $size = '8';
> $color = 'Red';
>
> row3
> $itemNum = 'SKU_9';
> $price = '5.00';
> $description = 'Widget';
> $size = '4';
> $color = 'Green';
>
> Now I am not sure if it is an @list I want or a %hash, but I want to be able
> to access this data later on. Also as I stated earlier, the rowcount will not
> always be the same, so I am not sure how to incorporate this into a for loop.
>
[snip]
I would use a hash of hashes. The following will load all of your data into a
hash called %product. The %product hash will grow to accomodate however many
records might be in the data in question, all keyed on the $itemNum. For my
purposes, the data is in the format as shown in __DATA__
while (<DATA>) {
($itemNum, $price, $description, $size, $color) = split/,/;
$product{$itemNum}{price} = $price;
$product{$itemNum}{description} = $description;
$product{$itemNum}{size} = $size;
$product{$itemNum}{color} = $color;
}
__DATA__
sku_1,30.00,widget,10,blue
sku_3,20.00,widget,8,red
sku_9,5.00,widget,4,green
That's it!
Now to access the information, try something like:
foreach $item ( keys %product) {
print "Item $item\n";
print "The price is: $product{$item}{price}\n";
print "Description: $product{$item}{description}\n";
print "The size is: $product{$item}{size}\n";
print "The color is: $product{$item}{color}\n";
print "\n";
}
For the data listed above, this will print out:
Item sku_9
The price is: 5.00
Description: widget
The size is: 4
The color is: green
Item sku_1
The price is: 30.00
Description: widget
The size is: 10
The color is: blue
Item sku_3
The price is: 20.00
Description: widget
The size is: 8
The color is: red
Tom Christiansen covers this all very well in the Blue Camel pp 270-272. The
same information can also be found on Tom's FMTEYEWTK (Far More Than
Everything You Ever Wanted to Know) Perl data structure links, which can be
found somewhere off of http://www.perl.com.
Hope that helps.
Patrick Timmins
U. Nebraska Medical Center
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 04 Aug 1998 15:12:36 +0800
From: Ryan Snowden <ryan@steelplan.com.au>
Subject: Re: cgi.pm and upload
Message-Id: <35C6B464.25F721ED@steelplan.com.au>
I used cgi-lib.pl to upload files. I had a similar file restruction of
about 2.54 meg, then I realised I had the line 'use strict;' sitting at the
top. I removed it and larger files work... not my problem is running out of
room :)
Ry.
Brandon Pulsipher wrote:
> I am using cgi.pm to upload files. Also, this is under ActiveState
> Perl 5.0003 on NT. Everything worked fine, and then I moved to a
> different server. Now, the upload seems to die on large files. The
> CGITempxxxx files are no larger than 50k, and the browser (both Netscape
> and IE) hang when trying to upload a file larger than this.
> Any help? I have tried to find code to just handle the upload
> myself, without cgi_lib.pl or cgi.pm, but I haven't figured that out
> yet. If anyone can help there, I would appreciate it.
> THANKS.
>
> -Brandon
> -Brandon@xmission.com
------------------------------
Date: 4 Aug 1998 06:37:12 GMT
From: mnc@diana.law.yale.edu (Miguel Cruz)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <6q6a6o$1c5$1@news.ycc.yale.edu>
Tom Christiansen <tchrist@mox.perl.com> wrote:
>Oh, it's true. The current moderator is just another hopelessly
>monolingual American. This is easily remedied. :-)
By naturalizing him in another country?
miguel
------------------------------
Date: 04 Aug 1998 09:05:16 +0100
From: Jim Brewer <jimbo@soundimages.co.uk>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <u4svt6ukj.fsf@jimbosntserver.soundimages.co.uk>
abigail@fnx.com (Abigail) writes:
> Randal Schwartz (merlyn@stonehenge.com) wrote on MDCCXCVIII September
> MCMXCIII in <URL: news:8cpveikmvo.fsf@gadget.cscaper.com>:
> ++ The "worldwide" language of technology is English. It happens to be the
> ++ only human language I speak, so I lucked out there. There are regional
> ++ non-English Perl groups that can properly hold announcements in other
> ++ languages. I'd like to restrict CLPA to articles I can read.
Randall made the point clearly. The "worldwide" language of technology
is English. He wasn't discussing the issues of language in
general. Only the issue of language with respect to technology put
within the global context. Perl is a technology, a technology which is
worldwide; and technology, worldwide, is dominated by English. In
truth, requires English. Thus, there are no language restrictions,
only the continuance of the current state of affairs, with respect to
language, with respect to technology, worldwide.
> So, a Perl Mongers announcement for the middle of the Yukon would be fine
> because it's in English, but the announcement for Lingua::FR::Inflect,
> written in French, is too regional for clpa? That's plain silly. I wouldn't
> call French or Spanish "regional" languages.
There was never the assertion that any of the other widely used
languages of the world are "regional". Only that technology is spoken
with English as a first language. Seems very reasonable to limit
postings to only the "first" language of a particualr
discipline. Including Perl. Including c.l.p.a.
As an aside, what's the difference between a 'plain silly' and a, say,
"fancy silly"? :-)
Jim Brewer
------------------------------
Date: Tue, 04 Aug 1998 10:34:06 +0200
From: Harald Joerg <Harald.Joerg@mch.sni.de>
Subject: Re: comp.lang.perl.announce redux
Message-Id: <35C6C77E.84EF1C04@mch.sni.de>
I R A Aggie wrote:
>
> In article <35C5F44B.79E8@min.net>, jdporter@min.net wrote:
>
> + How's this: the moderator adds a link at the bottom of each post
> + (added via a perl script, of course) which invokes AltaVista's
> + BabelFish appropriately so as to give a desired translation.
>
> Have you actually tried to use BabelFish? This is what you posted
> above, in German:
>
> Wie dieses ist: der Moderator f|gt ein Link an der Unterseite jedes
> Pfostens hinzu (hinzugef|gt |ber einen Perl-Index, selbstverstdndlich) der
> BabelFish AltaVistas passend hervorruft, um eine gew|nschte \bersetzung
> zu geben.
> [...]
> Not a great test (English->German->English), but technical terminology
> is not going to be translated well. Perhaps a proficient German reader
> can give us an idea of how well your paragraph translated.
Reads strange. Hard to guess whether I had understood it without
having read the original text first.
At least you'd have to divine what "Pfosten" (post/jamb) means
in this context. How wonderful that it translates back to "post" -
for "Unterseite" we were less lucky.
If, however, John Porter had written
"the moderator adds a link at the end of each article"
Babelfish would create
German: "der Moderator f|gt ein Link am Ende jedes Artikels hinzu"
English: "the moderator adds links at the end of each article
in addition"
It is more "jargon" than "technical terminology" which causes
the problems. Note that in German we still have to create a word
which could serve as a proper translation for "link". Usually
we say "Link" :-).
Another example for "technical terminology" (SCNR):
"Thyme, rosemary and sage" translated into German yields
"Thymian, Rosmarin und Salbei", which is quite correct.
Translating this back into English yielded to my surprise
"Thymian, Rosmarin and Salbei".
It seems that in general the translations from German
are much worse than those into German. Lucky me :-)
--
Guten Appetit (Enjoy your meal),
--haj--
------------------------------
Date: 04 Aug 1998 09:22:44 +0100
From: Jim Brewer <jimbo@soundimages.co.uk>
Subject: Re: Good Book?
Message-Id: <u1zqx6trf.fsf@jimbosntserver.soundimages.co.uk>
Tom Christiansen <tchrist@mox.perl.com> writes:
> Perhaps you might rephrase your followup in a less
> confrontational and antogonistic style, lest it be
> inadvertently placed in the destructive pile rather
> than the constructive one, since I'm nearly certain
> you're really just trying to help.
Tom, have you just slipped, as in Freudian? :-)
Jim Brewer.
------------------------------
Date: Mon, 03 Aug 1998 18:59:06 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Has anyone used the POP3 module ?
Message-Id: <35c607db.78749411@news2.cais.com>
Alan Silver <alan@find-it.furryferret.uk.com> Said this:
>hello,
>
>I wonder if anyone can help me. I would like to write a perl script that
>can be set up as a cron job to check a POP3 mailbox regularly. It would
>look at the mail waiting in the mailbox and if any recipients matched
>ones listed in a file, it would forward those to an new address,
>deleting them from the server. All other e-mails would be left alone.
>
>As I do not have access to a POP3 mail server, I am unable to test out
>such a script. Does anyone there know how to do it and have a POP3
>server that they could test it on for me ? Thanx very much for any help.
>
>Example of what I want to do :
>Let's say I own the domain furryferret.com and I want mail sent to
>Ferret and Gibbon to be forwarded on to Gerbil@second.domain.co.uk and
>Vole@another.domain.com respectively. (Sorry if anyone can't cope with
>all the furry animals). I would have a file that looked something like
>this ...
>
>Ferret Gerbil@second.domain.co.uk
>Gibbon Vole@another.domain.com
>
>The script would then check the POP3 mailbox and forward the mail as
>appropriate.
>
I think you are making it more difficult than necessary. First, you
could probably use a .forward file that points to a simple perl script
to handle this, or even more simple is to just set up the aliases file
so that ferret is aliased to gerbil@second.domain.co.uk, that way
anytime the mail server recieves mail for ferret, it just relays it to
second.domain.uk.
There's so much you can do once you've told sendmail to pipe the
message to an executable - you can set up "auto-reply" or send the
message to anyone, anywhere, or write it to another file, or whatever.
------------------------------
Date: Tue, 04 Aug 1998 06:13:23 GMT
From: greene@gucc.org
Subject: Re: help help help please!!!!
Message-Id: <6q68q3$2g4$1@nnrp1.dejanews.com>
In article
<17EE283EE436E57D.79B1767C5FCF431B.D6B604A0620B1D93@library-proxy.airnews.net
>, dstanton@airmail.net wrote:
> I am trying to create a form with a special function.
> [-snip-]
> If anyone can provide the Perl for this I would really appreciate it.
>
> Thanks in advance
>
> David
>
David,
If you are trying to program this yourself, and having problems with some
aspect of the script, prune it down to the few lines that are causing
problems and then post these for suggestions.
If you are looking to hire a programmer, there are other newsgroups more
appropriate for this type of posting.
If you are looking for a freebie, then you should check what you can find on
the Internet in one of the script archives, e.g. cgi-resources.com, or on
CPAN.
Most of us in c.l.p.m are professionals who offer advice to others free of
charge. I don't expect an architect to build me a house, just because he
answered a question about one.
Remember, the newsgroup are free. You get what you pay for.
--
J. Greene
Lvrrach, Germany
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 04 Aug 1998 08:31:15 +0200
From: Karolien <Karolien.Vanstraelen@tvd.be>
Subject: HELP ME please !!!
Message-Id: <35C6AAB3.E2CA826E@tvd.be>
Hello,
I have a problem in PERL.
I have a page with 2 frames : a top frame and a main frame.
In the top frame there is only a title ("products" or "market").
The problem is : in the main frame there are links to the products-page
and to the market-page. When you click on a link the page opens in the
main-frame. That's OK, but how can I change the title in the top-frame
to the right one (title for the link you click) ???
So if you click on the products-link, this page opens and the title has
to be changed in "products" in the top-frame. How can I do this in PERL
????
Please help me out!!
Thanks in advance
Caroline
------------------------------
Date: Tue, 4 Aug 1998 09:22:49 +0100
From: "Brett Lawrence" <Brettl@datent.com>
Subject: Re: help with string problem
Message-Id: <902218893.29591.0.nnrp-05.c3ad0896@news.demon.co.uk>
Brett Lawrence wrote in message
<902148658.2439.0.nnrp-04.c3ad0896@news.demon.co.uk>...
>Hi
>I have a dir with the file below in it
>v|dih`V\D.TXT
>
So to solve this I used two api calls. One to convert the filename into the
correct format for windows to read and the other to convert the filename
back to what perl gets from the readdir command.
use Win32;
use Win32::API;
# Translates a string into the OEM-defined character set.
$CharToOemBuff = new Win32::API("user32", "CharToOemBuffA", [P,P,N], N) or
die "unable to use API call from User32.dll\n";
# Converts a string pointed to by lpszOemStr from the OEM character set into
the Windows character set.
$oemtocharbuff = new Win32::API("user32", "OemToCharBuffA", [P,P,N], N) or
die "unable to use API call from User32.dll\n";;
open(INDEX, ">german.txt");
$path ='c:\german';
opendir(ROOT, $path); # open the directory
@files = sort(readdir(ROOT)); # Read files and directories into an array and
sort them
closedir(ROOT); # close the directory
$stringbuf1;
foreach (@files) # for each item in the array
{
$stringbuf1 = $_;
$num = length($stringbuf1);
$return = $oemtocharbuff->Call($stringbuf1,$stringbuf1,$num);
print(INDEX "$stringbuf1 == $stringbuf2\n");
}
close(INDEX);
------------------------------
Date: 4 Aug 1998 06:51:39 GMT
From: mnc@diana.law.yale.edu (Miguel Cruz)
Subject: Re: hiding user input
Message-Id: <6q6b1r$2eo$1@news.ycc.yale.edu>
Gary L. Burnore <whatpartofdontemailme@dontyouunderstand> wrote:
> The statement "Further email from you will be considered harassment and
> will be forwarded to your provider" wouldn't quite be asking, more like a
> warning.
That doesn't quite make it so. What if I "warn" my neighbor that if he
doesn't stop driving a blue Toyota then I will report him for harassing me?
miguel
------------------------------
Date: 04 Aug 1998 09:15:43 +0100
From: Jim Brewer <jimbo@soundimages.co.uk>
Subject: Re: hiding user input
Message-Id: <u3ebd6u34.fsf@jimbosntserver.soundimages.co.uk>
gbacon@cs.uah.edu (Greg Bacon) writes:
> So now is it our responsibility to keep up with who knows better and who
> doesn't? Come on. Some of us have real jobs and come here because we
> enjoy helping people. It takes most of the joy out of it for me when I
> come in to see that so many people have pissed on our walls.
Oh, how pious. Virtue and chivalry are alive and well and embodied
within Greg Bacon. Very reassuring. We will all sleep contented and
dream revelations.
If you don't like urine stay away from public places. If joy is what
you want, look to fulfilling interpersonal relationships. If a news
group is where you want to be, then start washing the walls or just
ignore what you see on the walls and get on with 'helping
people'. Since that is what you call it.
Don't bother with the wife beating rubbish again. It's tiresome. It's
pathetic. It's no longer original. It was NEVER funny.
Jim Brewer
------------------------------
Date: Tue, 04 Aug 1998 17:50:35 +0900
From: "B. Oiledanimalbyproducts" <sp@m.block>
Subject: Re: hiding user input
Message-Id: <35C6CB6A.38701D12@m.block>
Greg Bacon wrote:
> Bullshit. It is not an attack, but a demonstration. Do not blame me
> for the fact that 95% of people don't know anything about arguing.
Umm if 95% of the people get annoyed with you and only 5% don't, then that
suggests the problem is yours not the 95% - have you thought that maybe the 5%
can't be bothered trying to get you to see what the other 95% obviously object
to
"Chi tace non consente -vuole essere solo gentile" - those who don't speak up
are just being polite
------------------------------
Date: 4 Aug 1998 06:00:48 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: How to extrat characters from string
Message-Id: <6q682g$be2$1@marina.cinenet.net>
Alessandro Forghieri (alf@orion.it) wrote:
: ijg@csc.liv.ac.uk (I.J. Garlick) writes:
: > This is probably not the most efficient way but surely substr like this
: > will work
: >
: > my $sub = substr($string, $index, 1);
:
: I was wondering whether this would be more efficient:
:
: my $sub=chr(vec($string,$index,8));
:
: Probably not?
No need to guess:
#!/usr/bin/perl -w
# vecvsubs: Compare vec() and substr() for getting a char from a string.
# Craig Berry (19980803)
use Benchmark;
$sample = 'this is some sample text';
$index = 3;
timethese(100_000, {
VEC => '$a = chr(vec($sample, $index, 8))',
SUBS => '$b = substr($sample, $index, 1)'
});
print "$a $b\n"; # Just to be sure both got 's'.
Here are the results on my Solaris box:
Benchmark: timing 100000 iterations of SUBS, VEC...
SUBS: 3 secs ( 4.13 usr 0.00 sys = 4.13 cpu)
VEC: 4 secs ( 4.65 usr 0.00 sys = 4.65 cpu)
...which looks like a wash to me, which is a bit surprising. I'd expected
substr() to be far faster.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Mon, 03 Aug 1998 19:11:09 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Piping mail to a script that splits off attachments (Mailtools)
Message-Id: <35c60b27.79579505@news2.cais.com>
Andrew Perrin <aperrin@mcmahon.qal.berkeley.edu> Said this:
>I believe the munpack utility does this pretty cleanly, but I can't say
>I've played with it too much; check it out.
>
> munpack - unpack messages in MIME or split-uuencode format
>
>SYNOPSIS
> munpack [ -f ] [ -q ] [ -t ] [ -C directory ] [ filename ...
> ]
>
>DESCRIPTION
> The munpack program reads each RFC-822 message filename and
> writes all non-text MIME parts or split-uuencoded files as
> files. If no filename argument is given, munpack reads from
> standard input.
>
>
Where can I get this? It doesn't seem to be part of the "standard"
installation, or I'm not looking in the right place and it's just not
in my path
------------------------------
Date: Mon, 03 Aug 1998 19:08:27 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: random number
Message-Id: <35c60a82.79428722@news2.cais.com>
Peter Richmond <peter@richmd.demon.co.DELETE.uk> Said this:
>Hi,
>
>Could sell me tell me how I could create a random number - between 1
>and 1,000,000
>
$number = int(rand(1000000));
Though you could have found that out pretty easily, RTFM
------------------------------
Date: Tue, 4 Aug 1998 08:24:30 +0200
From: "Markus" <markus@ANTISPAM.workmail.com>
Subject: Security in PERL
Message-Id: <6q6cn8$po4$3@rzmux02.rz.uni-augsburg.de>
ATTENTION!
Please remove the 'ANTISPAM.' part of
my reply to field: markus@ANTISPAM.workmail.com
Thank you!
-------------------------------
Hello,
how do I implement the following secure PERL Prog:
I wrote a PERL prog, which deals with a passwort list, saved in an ASCII
File.
The PERL prog is implemented as a CGI-File, which is executed by the
webserver on demand of a web-surfer.
The PERL Prog should have access to the file, rights to modify and see the
content.
The Web-Surfer should be able to execute it, but not to see the
Password-File.
Any ideas?
Maybe with the use of S-UID resp. G-UID?
Thank you for your valuable help in advance.
Greetings
-Markus
------------------------------
Date: Tue, 04 Aug 1998 07:12:36 GMT
From: pat@uni.de (Patrick Clauberg)
Subject: Setting timeout?
Message-Id: <35c6b16d.178151@news.nef.wh.uni-dortmund.de>
Hi everybody,
I just did some perl around the smbclient thing (btw is there a perl
module to handle the smbclient?)
something like @result =`smbclient -L server`;
should give me the browse list, the server has got.
Some servers require a password, even though hitting return is enough
to get the list.
My problem is that I query a couple of servers automatically and the
program hangs if the server expects a password.
I really played with the -U and -N stuff of smbclient, but none of the
results really works with all hosts.
So, my question is if I can set some kind of timeout.
if the next step after the @result= is not being done within n
seconds, the @result thing should be canceled.
Can I determine in any way if my program hangs (due to unexpected
behaviour of the shell command)?
Second alternative would be to determine if the server is expecting
some kind of input. (in the normal shell he says "Password:" ) and
then producing the hit of the ENTER key.
I hope, somebody can help
email would be cool
Thanx
Patrick
------------------------------
Date: 4 Aug 1998 08:16:06 GMT
From: Wolfgang Denk <wd@uebemc.siemens.de>
Subject: Re: Setting timeout?
Message-Id: <6q6g06$s5d$1@galaxy.mchh.siemens.de>
pat@uni.de (Patrick Clauberg) writes:
>So, my question is if I can set some kind of timeout.
>if the next step after the @result= is not being done within n
>seconds, the @result thing should be canceled.
A search in the CPAN would have told you to "use Sys::AlarmCall;"
cpan> i /alarm/
Distribution JACKS/AlarmCall-1.1.tar.gz
Module Sys::AlarmCall (JACKS/AlarmCall-1.1.tar.gz)
cpan> i /timeout/
Distribution TOMC/scripts/ADVLABS/timeouts/TimeOut.pm.gz
Module TimeOut (TOMC/scripts/ADVLABS/timeouts/TimeOut.pm.gz)
Wolfgang Denk
--
Office: (+49)-89-722-27328, Fax -36703 Wolfgang.Denk@oen.siemens.de
Private: (+49)-89-95720-110, Fax -112 wd@denx.muc.de
Never underestimate the bandwidth of a station wagon full of tapes.
-- Dr. Warren Jackson, Director, UTCS
------------------------------
Date: Tue, 4 Aug 1998 09:35:07 +0100
From: avert@dial.pipex.com (Andrew Collington)
Subject: Taking out sections of a file? How do I do this?
Message-Id: <MPG.1030d817b67eecbd98968f@news.dial.pipex.com>
Hi there,
Could any of you please help me out here and tell me the best way to do
the following?
I have a file with a lot of news articles in it. What I would like to do
is be able to delete blocks of these articles automatically (when a user
selects which they would like deleted). The format is like this (example
out of a test file):
<START_ITEM_30>
<p><b><font color="#1B1A5F"><a name="30">title 2</a></font></b><i> - 20th
September '98</i></p>
<p>another test</p>
hmm.....................................................testing this.
<p align="right">(News item from: Andy, 20/9/98)<br><br><font size="-2">[
<a target="_top" href="#top_of_list">TOP</a> ]</font></p>
<p><hr></p>
<END_ITEM_30>
<START_ITEM_29>
<p><b><font color="#1B1A5F"><a name="29">title</a></font></b><i> - 20th
September '98</i></p>
another test
<p align="right">(News item from: The newspaper, 20/9/98)<br><br><font
size="-2">[ <a target="_top" href="#top_of_list">TOP</a> ]</font></p>
<p><hr></p>
<END_ITEM_29>
(Yes, I know the dates are wrong, but I was just testing the adding of
files ;)
As you can see, I can read from <START_ITEM_xx> to <END_ITEM_xx>, but
what I don't know is how to extract just that part and put it into an
array or something so that I can then strip certain tags from that block
and write it into another file.
I not only need to be able to do it on one article (eg, ITEM_29), but
multiple ones (like, ITEM_29, ITEM_10, ITEM_9 in one go).
If anyone can help or suggest anything I would be very grateful! If
there is anything lacking in my explaination of my problem, then please
email me and I'll try to explain it better :)
Thanks in advance!
Regards,
Andy
------------------------------
Date: 4 Aug 1998 08:05:20 GMT
From: Wolfgang Denk <wd@uebemc.siemens.de>
Subject: Re: WANTED: Perl Autoreponder - Any Takers?
Message-Id: <6q6fc0$rih$1@galaxy.mchh.siemens.de>
Graham Donohoe <gdonohoe@nmp.nokia.com> writes:
>> Try mailagent - it's great, and it's in perl.
>It's OK as long as you know some gents to mail.
I'm not sure I understand this...
mailagent is usually quite simple to install and configure, just like
Perl.
Where is your problem? [I don't remember your name showing up on the
mailagent mailing list, so you didn't have any problems, did you?]
Wolfgang Denk
--
Office: (+49)-89-722-27328, Fax -36703 Wolfgang.Denk@oen.siemens.de
Private: (+49)-89-95720-110, Fax -112 wd@denx.muc.de
Always try to do things in chronological order; it's less confusing
that way.
------------------------------
Date: 04 Aug 1998 10:55:42 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: WANTED: Perl Autoreponder - Any Takers?
Message-Id: <7x3ebdktwx.fsf@fidelio.vcpc.univie.ac.at>
Re: WANTED: Perl Autoreponder - Any Takers?, Wolfgang
<wd@uebemc.siemens.de> said:
Wolfgang> Graham Donohoe <gdonohoe@nmp.nokia.com> writes:
>>> Try mailagent - it's great, and it's in perl.
>> It's OK as long as you know some gents to mail.
Wolfgang> I'm not sure I understand this...
Wolfgang> mailagent is usually quite simple to install and
Wolfgang> configure, just like Perl.
Wolfgang> Where is your problem?
It was a *joke*.
mailagent ==> mail a gent(leman)
Oh dear, that was rather content-free.
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | personal email:
Stupid! Stupid!" ~ Eros, Plan9 fOS. | tony_curtis32@hotmail.com
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 3337
**************************************