in reply to setting CLASSPATH thru perl
You might consider using Inline::Java, rather than calling java with backticks. It may or may not work for you, but I think it's worth a look.