in reply to using local and pass by reference method

Efficient for what? Speed or maintainability? Assigning a reference is pretty low cost and lexical variables are slightly more efficient. It's probably much of a muchness either way but you should benchmark if you need to know.

use Benchmark; cmpthese ( -1, { local => sub { ... }, value => sub { ... }, );

Personally I'd use lexical variables and if copying was expensive or I wanted to modify the arguments use $_[0] etc or Data::Alias if I refer to an argument more than once or need to document it's purpose. For example

use Data::Alias; sub sample { alias $html = $_[0]; ... }