in reply to Re: reference question
in thread reference question

and as a third alternative - change the passed arguments directly:

sub add_txt_directly { foreach ( @_ ) { $_ .= '.txt'; } }

-- Hofmator