in reply to increasing value every time sub routine called
use feature "state"; sub a { state $i++; print $i; } a(); a(); a(); [download]