in reply to DIFFERENCE BETWEEN VARIABLE

Actually, there is a difference between $output and ${'output'}:
$output = "global"; { my $output = "my"; print $output; print ${'output'}; }
This little example will first print out "my" then "global". This is because the latter is a symbolic reference to the $output variable - hence it will always refer to the global variable (which is stored in the package stash).

${output} on the other hand is not a symbolic reference, and will still refer to the lexical variable (if one exists).

Autark.