DAT should be DATA.
As for your second question, the quoted line appends a space character before appending to the hash value. Your rewrite leaves out the space character. This may be significant.
In reply to Re: first perl example from perl book
by chromatic
in thread first perl example from perl book
by convenientstore
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |