See the state keyword. Alternatively, just use a global variable outside of your subroutine. Also see perlfaq7 for "How Do I Create A Static Variable?
In reply to Re: Using static variable in perl
by Corion
in thread Using static variable in perl
by newbie_coder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |