sub f { state $static_var = ... ... do something with $static_var here ... }