Try Flash ActionScript 3
Really. It is similar to Java, yet will allow you to really get your OOP gears moving, *plus* because you can easily manipulate visual objects (boxes, bouncing red balls, whatever) you can actually *see* the results of your coding.
Re-learning how to do the exact same things you already know how to do in Perl, in another language can be boring at best and frustrating at worst. I recommend you learn another language that can help you build on what you already know. Build a Flash front-end to a Perl back-end, connecting the dots between the two via JSON. You'll do some learning and gain some skills in the process.
ActionScript 3 is quite similar to Java and C#, yet with the scripty feeling of JavaScript. Here is an example:
package com.vw {
import flash.display.*
import com.vw.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.Rectangle;
public class MainScreen extends MovieClip {
public var controls:MovieClip;
public var viewPort:MovieClip;
public var imageCanvas:MovieClip;
public var navigator:MovieClip;
public function MainScreen() {
// Empty constructor:
}
public function init() :void {
App.Trace(this + "::init()");
controls.init();
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, handle_resize);
setTimeout(function():void {
handle_resize(new Event("dummy_event"));
imageCanvas.init();
navigator.init();
},1);
controls.addEventListener("zoomLevel_changed", zoomLevel_changed
+);
}
private function zoomLevel_changed(e:Event) :void {
dispatchEvent(e);
}
private function handle_resize(e:Event) :void {
App.Trace("stage.stageWidth: " + stage.stageWidth);
viewPort.width = stage.stageWidth;
viewPort.height = stage.stageHeight - controls.height;
viewPort.y = 60;
viewPort.x = (stage.stageWidth / 2) - (viewPort.width / 2);
var orig:Object = {
width: 900,
height: 550
};
if( x > 0 )
x = 0;
// Move the controls so that they are centered:
controls.x = (stage.stageWidth / 2) - (controls.width / 2);
if( controls.x < 0 )
controls.x = 0;
// Move the navigator so that it is bottom-right justified:
navigator.x = viewPort.width - navigator.width - 20;
navigator.y = viewPort.height - navigator.height + controls.heig
+ht - 20;
// Move the log too:
App.log.x = 20;
App.log.y = viewPort.height - App.log.height + controls.height -
+ 20;
dispatchEvent( new Event("resized"));
}
}
}