#define-like feature in Perl

From: Yash (yashgt_at_yahoo.com)
Date: 09/29/04


Date: 29 Sep 2004 05:55:50 -0700

Hi,

In a perl 5.8 program, We have to use a long list of variables in a
certain order in a number of places. It is something like:
my ($var1, $field2, $a3, $b4, .....) ;
        .
        .
        .
foreach $x ($var1, $field2, $a3, $b4, .....) {
        $x = -1 ;
}
        .
        .
        .
print join(",",($var1, $field2, $a3, $b4, .....)) ;

Instead of having to repeat the names of the fields and their order,
in all places of use, we would like to have something like
#define FIELD_LIST $var1, $field2, $a3, $b4, .....

and user FIELD_LIST in all places.
This is important for us as the fields and their order may change as
the program evolves.
Can somebody suggest a better alternative?

Thanks