use happens at compile time. Your $test hasn't been assigned a value yet. Wrap it in a BEGIN { } block and it will work.
In reply to Re: problem with creating constants from scalar
by Fletch
in thread problem with creating constants from scalar
by needperlhelp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |