sub mine { local( $_ ); while( ) { s/this/that/g; { local( $_ )= $_; yours( $_ ); } s/that/this/g; }