One way to deal with this in Perl is to say have a .ini file. Stick these "magic" definitions like "MAX_RECS_PER_LINE = 8" in that file. Parsing a .ini file can get to be a pretty big deal in 'C'. In Perl, this is easy as there are a number of "config" modules that do that. At times I have built a "front-end" module that uses some flavor of the configuration .ini modules.
Anyway one possibility is to have say $MAX_RECS_PER_LINE as a program variable and you ask the config module (really a mini read only DB in simple case) what MAX_RECS_PER_LINE means.
In reply to Re: Perl "Constants"
by Marshall
in thread Perl "Constants"
by zerohero
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |