should give you basic undestanding of perl.
it's not a dificult language and in most cases you'll be able to do everything you'll need using it.
just to give you an example how easy it is: some time ago i was experimenting with google's speach recognition. i wanted my ubuntu server to react on voice commands.
so i wrote a script in perl to establish connection with remote server, listen, encode audio, send it to google, get back text, and do what i tell it to do. everything making sure connection is always open to save time on negotiation.
it took me maybe 3 hours and that was my first contact with perl.
also perl's syntax is similar to C so it should be easy for you to make a transition to some "more serious" language when you'll need to.
java i wouldn't recommend. read this: http://www.jwz.org/doc/java.html