[11868] in Perl-Users-Digest
Perl-Users Digest, Issue: 5468 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 23 19:07:26 1999
Date: Fri, 23 Apr 99 16:00:15 -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 Fri, 23 Apr 1999 Volume: 8 Number: 5468
Today's topics:
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1)) <rapision@neobit.net>
... Some shell/perl questions ... (Kenny McCormack)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 24 Apr 1999 07:45:15 +0900
From: "Rapision" <rapision@neobit.net>
Subject: $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
Message-Id: <7fqtf5$pj1$1@news2.kornet.net>
Although I met the following line many times while I study perl,
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
I can not understand exactly what it means.
Please advise me how it works.
Thanks in advance.
Newbie
------------------------------
Date: 23 Apr 1999 17:23:09 -0500
From: gazelle@yin.interaccess.com (Kenny McCormack)
Subject: ... Some shell/perl questions ...
Message-Id: <7fqrsd$1ee$1@yin.interaccess.com>
In article <slrn7i1ocp.1r9.dragons@dragons.duesouth.net>,
Matthew Bafford <dragons@dragons.duesouth.net> wrote:
....
>: #!/usr/bin/perl
>: sub handler {
>: local($sig = $g) = $
>: print "Caught a SIG$sig - shutting down\n";
>: exit 0;
>: }
>:
>: $SIG{'INT'}
>: $SIG = 'handler';
>: system 'cat';
>: print "Perl exiting...\n";
>:
>: I would like my handler to be called when the user ^C's the cat program.
>: Is this possible?
>
....
>Because C<system()> and backticks block C<SIGINT> and C<SIGQUIT>, killing
>the program they're running doesn't actually interrupt your program.
><snip>
>
>So, manually do exactly what system does.
BUT...
According to the Camel book (page 192):
--- Cut Here ---
system
This function executes any program on the system for you. It does
exactly the same thing as "exec LIST" except that a FORK is done first
and the script waits for the program it's running to complete.
--- Cut Here ---
This sounds to me like it literally does a fork()/exec()/wait(), rather than
calling system() [*]. Perhaps this assumption is wrong...
[*] Subject, of course, to the assumption that the command is simple
enough that it can be executed directly, w/o invoking /bin/sh.
------------------------------
Date: 12 Dec 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 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 5468
**************************************