I am reading [Learning Perl 6th edition](http://shop.oreilly.com/product/0636920018452.do), and the subroutines chapter has this code:

```
foreach (1..10) {
  my($square) = $_ * $_; # private variable in this loop
  print "$_ squared is $square.\n";
}

```

Now I understand that the list syntax, ie the brackets, are used to distinguish between list context and scalar context as in:

```
my($num) = @_; # list context, same as ($num) = @_;
my $num = @_; # scalar context, same as $num = @_;

```

But in the foreach loop case I can't see how a list context is appropriate.

And I can change the code to be:

```
foreach (1..10) {
  my $square = $_ * $_; # private variable in this loop
  print "$_ squared is $square.\n";
}

```

And it works exactly the same. So why did the author use my($square) when a simple my $square could have been used instead?

Is there any difference in this case?