in reply to Barewords and equality tests
SERVICE_STOPPED and SERVICE_STARTING may be constants:
use strict; use warnings; use constant SERVICE_STARTING => 1; use constant SERVICE_STOPPED => 0;
Constants in Perl are just a sort of subroutine with special optimizations. Thus, they follow subroutine syntax rules. We don't get concerned when we see 'shift' as a bare word.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Barewords and equality tests
by punkish (Priest) on Dec 29, 2004 at 22:56 UTC |