$# (not #$) refers to the index of the last element of an array.
The "at-sign" sigil (@) is used when you refer to two or more elements of an array. If you are accessing (or referring to) a single element of an array, then the "dollar-sign" ($) sigil is used.
my @foo = qw/a b c/;
print "$foo\n"; # Prints b
print "@foo\n"; # Prints a b c
print "$foo[$#foo]\n"; # Prints c (but you would probably never do th
print "$foo[-1]\n"; # Also prints c (a better way than the previou
print "@foo[0,2]\n"; # Prints a c