in reply to Why is this incorrect?

sub $do_one_thing { ...
You probably want this to be
sub do_one_thing { ...