you initiate the hash with %, and add keys with $, which in my book is wickedly confusing.
You're thinking of the big picture while you should be looking at the smaller picture. The sigil is not based on the data structure, it's based on the value being being fetch/set. Hash values are scalars, so "$" is used when fetching/setting hash values.
%hash = ();
I'm surprised you've ever have to do that. Hashes and arrays start off empty. Do you properly scope your hashes and arrays using my? use strict; will identify your most blatant scoping errors (i.e. where you didn't limit the scope at all).
is it ok to program exclusively like this?
Anything abnormal increases the chance of errors and reduces readability.
In reply to Re: Only using scalers and references
by ikegami
in thread Only using scalers and references
by stevesnz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |