David B
In this context, they should be equivalent, however, many times parentheses either change the order of operations in which something is performed, or the type of the returned variable (listing). Different functions can handle lists against arrays / hashes in different ways.
Operating procedure
In a foreach loop, it is typical to sort the listing:
foreach my $key (sort keys %hash) { ... }
This can also be written like this:
foreach my $key (sort(keys(%hash))) { ... }
Lists
On the other hand, you should look at the difference between a list, an array, and a hash. Lists are usually the base type, where the hash / arrays have additional functions / features. Some functions will work only on lists, but not on their scalar counterpart.
Addendum:
I should also add that Randal Schwartz (co-author of Camel's first book) indicated in previous citations that the for loop is from C and the foreach loop is from Csh. What is inside the parentheses is used to determine which loop is used by perl. The for / foreach parameter can be used interchangeably only because perl parses the contents in () and then determines which construct to use.
source share