in reply to Re^3: Hard syntax error or disambiguable parsing?
in thread Hard syntax error or disambiguable parsing?

I for one applaud your statement about clarity! I see a lot of code on Monks that uses obscure features of Perl when they aren't necessary.

I also see a massive fascination with $#list. I don't understand why that is! The scalar value of @list does everything I need.

One of the magic things about Perl is the ability to iterate over a list without knowing or caring about the "last index" or how many things are even in the list!

I always use foreach(@list){} instead of for(@list){}. A "C" style "for loop" is a rare duck in Perl (although seldom doesn't mean never). Even though "for" and "foreach" are equivalent in this case, foreach my $variable (@list){} is more clear. HORRAY!

  • Comment on Re^4: Hard syntax error or disambiguable parsing?