http://www.perlmonks.org?node_id=998065


in reply to Join function

Double quotes interpolate variable values, and @- is a special variable. Use single quotes instead:
my $string = join ('-@-', sort@array); # My output # The string contains five-@-four-@-one-@-three-@-two

UPDATE: Here is a quote from perlop which I think is a handy bit of trivia:

"Punctuation" arrays such as @* are usually interpolated only if the name is enclosed in braces @{*}, but the arrays @_ , @+ , and @- are interpolated even without braces.