in reply to Memory Use and/or efficiency passing scalars to subs

I'm not sure I understand the problem, but why are you using prototypes and taking a reference to the parameters? I think the following is more obvious:

my $big_text = get_big_text(); process_text(\$big_text, \$other_big_text); sub process_text { my ($big_text_ref, $other_big_text_ref) = @_; # do something print ${$big_text_ref}, ${$other_big_text_ref}; }