I suppose it would be possible to have your java program act as a "main" method, call down into JNI, and from JNI embed a perl interpreter which would (by various function calls) manipulate the Java code while in JNI land (JNI allows for all sorts of Java language abuses, including private variable access). JNI ain't fun though, nor is embedding an interpreter.
If your interpretation of the OPs meaning is right, and using perl in java is a viable solution, gmpassos' PLJava would be the first thing to look at...
regards,
tomte
An intellectual is someone whose mind watches itself. -- Albert Camus