B
Bill H
I have an array that I want to reference the different items by a
constant instead of the actual value (quick code snippet example):
x_PLS = 0;
y_PLS = 1;
xscale_PLS = 2;
yscale_PLS = 3;
lock_PLS = 4;
constrain_PLS = 5;
useBW_PLS = 6;
transparency_PLS = 7;
dragx_PLS = 8;
dragy_PLS = 9;
dragwidth_PLS = 10;
dragheight_PLS = 11;
category_PLS = 12;
imagenumber_PLS = 13;
width_PLS = 14;
height_PLS = 15;
caption_PLS = 16;
@photoLayer = ();
.... file the array from a file
$photoLayer[lock_PLS] = 1;
But perl seems to require that I make all my constants variables
($lock_PLS versus lock_PLS). Since these values are constant and will
not change, do I have to do this or am I missing a step?
Background reasoning for wanting to do this, my Flash App uses the
same constants and I want to be able to cut / paste the latest
constant values from the actionscript into the perl code and not have
to maintain 2 different versions of the same file (one with "$" before
the constant name, one without).
Bill H
constant instead of the actual value (quick code snippet example):
x_PLS = 0;
y_PLS = 1;
xscale_PLS = 2;
yscale_PLS = 3;
lock_PLS = 4;
constrain_PLS = 5;
useBW_PLS = 6;
transparency_PLS = 7;
dragx_PLS = 8;
dragy_PLS = 9;
dragwidth_PLS = 10;
dragheight_PLS = 11;
category_PLS = 12;
imagenumber_PLS = 13;
width_PLS = 14;
height_PLS = 15;
caption_PLS = 16;
@photoLayer = ();
.... file the array from a file
$photoLayer[lock_PLS] = 1;
But perl seems to require that I make all my constants variables
($lock_PLS versus lock_PLS). Since these values are constant and will
not change, do I have to do this or am I missing a step?
Background reasoning for wanting to do this, my Flash App uses the
same constants and I want to be able to cut / paste the latest
constant values from the actionscript into the perl code and not have
to maintain 2 different versions of the same file (one with "$" before
the constant name, one without).
Bill H