If you are unsure on something, just start up the perl debugger and use perl in immediate mode. Java tries to solve this problem by doing some of the memory management for you, but it doesn't go far enough. For example, arrays in Java are of a fixed size. There is no way to expand them. It is just a thing, and Perl is conducive to dealing with chunks the way a human thinks of it instead of bending over backwards to make it easy on the computer.
All languages have rules.
But some languages have more intuitive rules than others. Some languages won't let you add a number and a string because of 'type purity' reasons. Perl is different. Instead of forcing the programmer to declare the type of variables, perl infers the type from how it's used. C and UNIX Shell programming Perl borrows elements of sed, awk, sh, csh, and grep.