in reply to chomp it chomp it good

How does chomp change the contents of the string without the need to pass it in by reference?

Aside from the fact that chomp is an operator (so special rules could apply), arguments are always passed by reference in Perl.

sub foo { $_[0] = 'def'; } my $x = 'abc'; foo($x); print("$x\n"); # def

You seem to be confusing passing by reference (the term you used and the reason it works) and passing references to variables (something unrelated).