# Set variables for the next group of operations. MyMod->opt(1 => 1, 2 => 1); for ( 1..10 ) { MyMod->set( $_ ); MyMod->do_op(); }