in reply to wake on lan usage

I've read the documentation, and you do appear to be using the function correctly. I agree, it does seem pretty straight forward, and you already made sure that wake-on-lan was enabled.
Try running the program w/ '-d', or do:
Net::Wake::by_udp('XXX.XXX.XXX.XXX', '00:AA:BB:CC:DD:EE') || die ("Err +or occurred: $!.");
...to find out if everything is really going as smoothly as it seems.
HTH,
Chris