[24577] in Perl-Users-Digest
Perl-Users Digest, Issue: 6753 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 1 00:05:47 2004
Date: Wed, 30 Jun 2004 21:05:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 30 Jun 2004 Volume: 10 Number: 6753
Today's topics:
Re: catching ctrl chars (justme)
Re: catching ctrl chars <kkeller-usenet@wombat.san-francisco.ca.us>
Re: Getting to variables contained in a typeglob refere <this.is@invalid>
Re: monitoring changing web pages (krakle)
Multiple email recipients using NMS Formail (Adam)
Re: Why can't I get WWW::Mechanize->find_all_links to w <atp5470 at fsu.edu>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 30 Jun 2004 19:45:05 -0700
From: eight02645999@yahoo.com (justme)
Subject: Re: catching ctrl chars
Message-Id: <c0837966.0406301845.1ec7f644@posting.google.com>
Abigail <abigail@abigail.nl> wrote in message news:<slrnce4sfp.llu.abigail@alexandra.abigail.nl>...
> justme (eight02645999@yahoo.com) wrote on MMMCMLVI September MCMXCIII in
> <URL:news:c0837966.0406292341.76b1d013@posting.google.com>:
> <> hi
> <>
> <> how can i catch Ctrl-x (or any other letters except 'c' ) in perl ??
> <> thanks..
>
>
> What do you mean by "catching" ctrl-x? Matching with a regex?
>
>
> Abigail
hi
i want to catch from the keyboard. I have looked at perldoc -q signal
$Interrupted = 0; # to ensure it has a value
$SIG{INT} = sub {
$Interrupted++;
syswrite(STDERR, "ouch\n", 5);
}
Does this example catch Ctrl-x?
------------------------------
Date: Wed, 30 Jun 2004 20:13:40 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: catching ctrl chars
Message-Id: <4hvvbc.5gm.ln@goaway.wombat.san-francisco.ca.us>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
On 2004-07-01, justme <eight02645999@yahoo.com> wrote:
> i want to catch from the keyboard. I have looked at perldoc -q signal
perldoc -q signal talks about trapping signals, not catching keystrokes.
> $Interrupted = 0; # to ensure it has a value
> $SIG{INT} = sub {
> $Interrupted++;
> syswrite(STDERR, "ouch\n", 5);
> }
>
> Does this example catch Ctrl-x?
No, it traps SIGINT, which is commonly sent by ctrl-c. IIRC ctrl-x
doesn't normally send a signal, so you can't trap it this way.
Why don't you describe your goal, rather than trying to describe what
you think you want to do? Why are you so concerned with ctrl-x?
- --keith
- --
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQFA44FhhVcNCxZ5ID8RAgSfAJwOszJpruEcvk6lD6kgMqSVhWotjwCgjq6C
Ro02Dl1lGYWpTt+NrFDzCAE=
=EM95
-----END PGP SIGNATURE-----
------------------------------
Date: Thu, 01 Jul 2004 01:18:27 +0200
From: ddtl <this.is@invalid>
Subject: Re: Getting to variables contained in a typeglob referenced by a scalar.
Message-Id: <f3i6e05e3lak8juphn1blglae2i5m9q4a2@4ax.com>
>
>If you want the array and hash in the GLOB, then you write:
>@$$fh and %$$fh respectively (not @$fh and not %$fh);
>
>It 'works' because the deference syntax is unambiguous.
But why not use $@$fh or $%$fh - it shouldn't be ambiguous -
the first $ indicates that fh is a scalar. The second funny character
indicates that we dereference scalar and getting to the typeglob
(typeglob is either a scalar, or array or hash, so every funny
character should do - why give special privilege to $?). Then we
use another $, to show that we dereference typeglob and want
to get the scalar value. We always indicate the desired type
of a reference - first reference to a typeglob, then reference to
a scalar. Why not, then?
>'perldoc perlref'
>
> A typeglob may be dereferenced the same way a reference can, because
> the dereference syntax always indicates the type of reference desired.
> So "${*foo}" and "${\$foo}" both indicate the same scalar variable.
------------------------------
Date: 30 Jun 2004 18:11:18 -0700
From: krakle@visto.com (krakle)
Subject: Re: monitoring changing web pages
Message-Id: <237aaff8.0406301711.668dfed5@posting.google.com>
Sherm Pendley <spamtrap@dot-app.org> wrote in message news:<ccSdnVwZTbpB4H3dRVn-uw@adelphia.com>...
> krakle wrote:
>
> > Why would you bother using LWP to fetch the modification date of a
> > LOCAL file?
>
> Who said anything about local files? The OP said he wanted to monitor "a
> specific page".
>
My mistake, Sherm. I was under the assumption he was trying to monitor a local file.
------------------------------
Date: 30 Jun 2004 15:45:13 -0700
From: areynoldsx@hotmail.com (Adam)
Subject: Multiple email recipients using NMS Formail
Message-Id: <a84b035a.0406301445.6479eb0f@posting.google.com>
Hi,
I am using Version 3.12c1 of NMS FormMail.
I am unable to get the script to post to mulitple email accounts.
The mail will only get sent to the first email account
in the '@allow_mail_to' array.
How can I have the mail forward on to multiple accounts ?
The script is standard apart from some formatting changes to the
generated html.
[snip]
$max_recipients = 5;
$mailprog = '/usr/lib/sendmail -oi -t';
$postmaster = '';
@referers = qw(mydomain.com);
@allow_mail_to = qw(email1@mydomain.com email2@mydomain.com);
@recipients = ();
[snip]
The init_allowed_address_list function is unchanged.
[snip]
sub init_allowed_address_list {
my ($self) = @_;
my @allow_mail = ();
my @allow_domain = ();
foreach my $m (@{ $self->{CFG}{allow_mail_to} }) {
if ($m =~ /\@/) {
push @allow_mail, $m;
}
else {
push @allow_domain, $m;
}
}
my @alias_targets = split /\s*,\s*/, join ',', values %{
$self->{CFG}{recipient_alias} };
push @allow_mail, grep /\@/, @alias_targets;
# The username part of email addresses should be case sensitive, but
the
# domain name part should not. Map all domain names to lower case
for
# comparison.
my (%allow_mail, %allow_domain);
foreach my $m (@allow_mail) {
$m =~ /^([^@]+)\@([^@]+)$/ or die "internal failure [$m]";
$m = $1 . '@' . lc $2;
$allow_mail{$m} = 1;
}
foreach my $m (@allow_domain) {
$m = lc $m;
$allow_domain{$m} = 1;
}
$self->{Allow_Mail} = \%allow_mail;
$self->{Allow_Domain} = \%allow_domain;
}
[snip]
Thanks in advance,
Adam
------------------------------
Date: Wed, 30 Jun 2004 19:06:12 -0500
From: "Andrew Palmer" <atp5470 at fsu.edu>
Subject: Re: Why can't I get WWW::Mechanize->find_all_links to work?
Message-Id: <10e6l7ii394duc4@corp.supernews.com>
This is not that complicated a problem, guys:
use strict;
use LWP::UserAgent;
my $URL =
'http://www.loraincountycpcourt.org/nxquick.exe?pname=smith,+john';
my $ua=new LWP::UserAgent;
my $response=$ua->get($URL);
my $content=$response->content;
while($content=~/<a href="(.*?casen.*?)\s*"/ig)
{
print "$1\n";
}
------------------------------
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:
#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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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.
#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 V10 Issue 6753
***************************************