You should (re-)read perlreftut and perllol while possibly having copies of Data::Dumper output of your samples' contents handy. That being said when you're referencing a single element of an array having a leading @ sigil is a good sign you're doing something wrong.
You're also probably confusing yourself trying to directly compare an array reference in the scalar $table against an actual array @table2. When you initialize my @table2 = [ [7, 8, 9], ... ] what you're actually doing is putting a reference to an anonymous array into the 0th (first) element (i.e. you're setting $table2[0] to point to an arrayref) so that's where your extra level of indexen comes in.
Edit: perldsc might also be useful for more examples. Also tweaked wording.
The cake is a lie.
The cake is a lie.
The cake is a lie.