Perl Syntax

John Vetterli jvetterli-zC6tqtfhjqE at public.gmane.org
Tue May 24 03:28:28 UTC 2005


On Mon, 23 May 2005, Kevin C. Krinke wrote:
> %SIG which $SIG{INT} is a part of is one of the "magical" things in
> Perl. The %SIG hash represents all the different application signals
> (ie: kill, term, quit, hup, etc) and what to do when the individual
> signals are received.
> $SIG{INT} is the INTerrupt signal which is normally associated with
> something bad happening that cases the program to exit prematurely.
> ...
> Now whenever the program receives the application signal "INT", the
> function do_signal will be called because the code reference to the
> function do_signal is referenced as the value of the INT key of the
> magical %SIG hash.

So is the "INT" in $SIG{INT} a string literal (i.e. is it really 
$SIG{"INT"}) or a variable name?  Or is it something else?

JV
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list