Don't assign to a global variable without localising it. You just clobbered your parent's data.
sub do_stuff1 {
local $_ = shift;
chomp;
say;
}
or even safer:
sub do_stuff1 {
${ local *_ } = shift;
chomp;
say;
}
The latter handles the case where $_ is tied or otherwise magical. For example, $_ is magical if the parent does
for (..., $tied, ...) {
...
do_stuff1(...);
...
}
or
for (..., substr($s, ...), ...) {
...
do_stuff1(...);
...
}
You've ended up complicating things instead of simplifying them. It's best not to use $_ here.