Perl Syntax
Taavi Burns
jaaaarel-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Tue May 24 13:03:45 UTC 2005
On 5/24/05, Peter <plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org> wrote:
>
> On Mon, 23 May 2005, John Vetterli wrote:
>
> > 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?
>
> It stays for SIGINT which is a symbol name that is equivalent to the
> code of the interrupt signal. In Perl it need not be a number (Perl uses
> hashes - i.e. SIGINT is simply a key in a database of tuples).
However, being a bareword (no sigil, not in the context of a file
handle, and not a number) it's interpreted as a string and $SIG{INT}
should be equivalent to $SIG{"INT"} and equivalent to $SIG{'INT'}.
--
taa
/*eof*/
--
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