in reply to for, foreach: any difference?

Camel Book, 3rd Edition, page 118 says, "The foreach keyword is just a synonym for the for keyword, so you can use for and foreach interchangeably, whichever you think is more readable in a given situation." So you could do:
#!/usr/bin/perl use strict; my @array = qw(one two three four); print "Foreach:\n"; foreach my $item (@array) { print "$item\n"; } print "\nFor:\n"; for my $item (@array) { print "$item\n"; }
Same thing...