Re: use constant XX => ( ...
- From: Josef Moellers <josef.moellers@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Nov 2008 12:43:05 +0100
Julian Lafontaine wrote:
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?
It is a list. The "=>" are "fat commas".
--
These are my personal views and not those of Fujitsu Siemens Computers!
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize (T. Pratchett)
Company Details: http://www.fujitsu-siemens.com/imprint.html
.
- References:
- use constant XX => ( ...
- From: Julian Lafontaine
- use constant XX => ( ...
- Prev by Date: how to support delete of <directoryname> as well as <directoryname>/
- Next by Date: Re: use constant XX => ( ...
- Previous by thread: use constant XX => ( ...
- Next by thread: Re: use constant XX => ( ...
- Index(es):
Relevant Pages
|