In Perl, is there any difference between direct glob aliasing and aliasing via the stash?

Viewed 294

In Perl, is there ever any difference between the following two constructs:

*main::foo = *main::bar

and

$main::{foo} = $main::{bar}

They appear to have the same function (aliasing all of the slots in *main::foo to those defined in *main::bar), but I am just wondering if this equivalency always holds.

4 Answers
Related