compare the features of perl with java
Answers
Taking a stab at an alternative answer since the currently selected one seems to be focusing on differences between the two (truly there are not a lot of similarities between Perl and Java).
Similarities
They are both C-like (they have loops and braces and semi-colons)
They are principally imperative
Neither produce compiled binaries
They are both very mature
They are both battle-tested in the enterprise (Perl more as ops glue and Java more as applications/services)
They are both popular
They both support object-orientation
They both have a wide array of frameworks available
They both have books published about them
They are both higher-level than C/assembly
They are both "slow" (for various, specific scenarios of slow in that neither are C/assembly)
They both manage memory automatically ("garbage collection")
Neither are hip/cool as of summer 2012
They are both entrenched in the open source community
They are both available for many platforms
If your Perl code is very rigorous and orthogonal (well-tested, well-documented, uses Moose or strict object-orientation), then those concepts will carry very well into Java, since Java is extremely orthogonal and not as expressive.
Perl is a high-level, general-purpose, multi-paradigm, interpreted, dynamic programming language. Java is a high-level, general-purpose, mostly single-paradigm, statically typed programming language.
So, both are high-level:
A high-level programming language is a programming language with strong abstraction from the details of the computer.
and general-purpose:
In computer software a general-purpose programming language (GPL) is a programming language designed to be used for writing software in a wide variety of application domains.
In essense this means that everything you can do with Perl, you can also do with Java. And as @KyleHodgson mentions, both their syntaxes derive from C and C++ and the syntax for simple stuff like for loops and if statements is essentially the same - and as @DipanMehta notes, both are garbage collected. And of course both are extremely popular and have vibrant communities.
But that's where the similarities stop. Perl is multi-paradigm, supporting a wide range of programming paradigms:
Functional programming,
Imperative programming,
Class based object-oriented programming,
Reflective programming,
Procedural programming, and
Generic programming