On Sat, 05 Apr 2008 12:25:15 +1100, ken Foskey wrote:
> Is there any real advantage of
>
> use constant PART_NUMBER => 'P/N';
> over
> my $PART_NUMBER = 'P/N';
>
> Yes I know that it can be modified but conventions such as upper case
> constants can almost remove that problem.
Or totally remov
On Fri, Apr 4, 2008 at 1:17 PM, <[EMAIL PROTECTED]> wrote:
snip
> > my $part = $parts{ $key }{ +PART_NUMBER };
snip
> Thanks for your help. Your suggestion worked, but what exactly is the
> '+' doing in this case?
snip
from perldoc perlop
Unary "+" has no effect whatsoever, even on str
On Apr 4, 10:30 am, [EMAIL PROTECTED] (Rob Dixon) wrote:
> [EMAIL PROTECTED] wrote:
> > use constant PART_NUMBER=> 'P/N';
>
> > print PART_NUMBER;
>
> > The above prints, "P/N", as I would expect. Later in the script I
> > want to access a hash value using the constant like this:
> > m
On Apr 4, 9:37 am, [EMAIL PROTECTED] (Jeff Pang) wrote:
> On Fri, Apr 4, 2008 at 11:42 PM, <[EMAIL PROTECTED]> wrote:
> > use constant PART_NUMBER=> 'P/N';
>
> > print PART_NUMBER;
>
> > The above prints, "P/N", as I would expect. Later in the script I
> > want to access a hash val
ken Foskey wrote:
> On Sat, 2008-04-05 at 00:37 +0800, Jeff Pang wrote:
>> On Fri, Apr 4, 2008 at 11:42 PM, <[EMAIL PROTECTED]> wrote:
>>> use constant PART_NUMBER=> 'P/N';
>>>
>>> print PART_NUMBER;
>>>
>>> The above prints, "P/N", as I would expect. Later in the script I
>>> want
On Sat, 2008-04-05 at 00:37 +0800, Jeff Pang wrote:
> On Fri, Apr 4, 2008 at 11:42 PM, <[EMAIL PROTECTED]> wrote:
> > use constant PART_NUMBER=> 'P/N';
> >
> > print PART_NUMBER;
> >
> > The above prints, "P/N", as I would expect. Later in the script I
> > want to access a hash val
[EMAIL PROTECTED] wrote:
> use constant PART_NUMBER=> 'P/N';
>
> print PART_NUMBER;
>
> The above prints, "P/N", as I would expect. Later in the script I
> want to access a hash value using the constant like this:
> my $part = $parts{ $key }{ PART_NUMBER }; <- this doesn't work, but
On Fri, Apr 4, 2008 at 11:42 PM, <[EMAIL PROTECTED]> wrote:
> use constant PART_NUMBER=> 'P/N';
>
> print PART_NUMBER;
>
> The above prints, "P/N", as I would expect. Later in the script I
> want to access a hash value using the constant like this:
> my $part = $parts{ $key }{ PAR