use constant XX => ( ...
- From: Julian Lafontaine <nospam@xxxxxxxxxx>
- Date: Wed, 19 Nov 2008 11:06:09 +0100
Hi Group,
There are two syntax for the "use constant" pragma: to declare a scalar or to declare a list.
use constant CONST => scalarvalue;
use constant LIST => qw( listitem1, listitem2, listitem3);
I've found this in a perl module :Win32::Exe.
Could someone explain the syntax?
use constant DISPATCH_TABLE => (
"PE\0\0" => "PE",
'*' => sub { die "Incorrect PE header -- not a valid .exe file" },
);
What is DISPATCH_TABLE: a scalar or a list?
Thanks in advance.
.
- Follow-Ups:
- Re: use constant XX => ( ...
- From: Peter J. Holzer
- Re: use constant XX => ( ...
- From: A. Sinan Unur
- Re: use constant XX => ( ...
- From: Tad J McClellan
- Re: use constant XX => ( ...
- From: Josef Moellers
- Re: use constant XX => ( ...
- Prev by Date: FAQ 7.14 What is variable suicide and how can I prevent it?
- Next by Date: how to support delete of <directoryname> as well as <directoryname>/
- Previous by thread: FAQ 7.14 What is variable suicide and how can I prevent it?
- Next by thread: Re: use constant XX => ( ...
- Index(es):
Relevant Pages
|