Iggy, please cheer down. Controlling relays in the fashion you suggest is almost trivial to one skilled in the art, but you are asking for a very great leap, specifically from perl to RS-232. There are software drivers available to do this, and there are abundant websites with the circuitry that you'd need to implement it, and you could even probably find hardware drivers that perl could talk to, but there are intermediate steps. For example, perl can open a socket just like it can open a file. And, since I haven't heard otherwise, I'm guessing she can open a port, just like C can. But somebody would have had to have written the driver.
In assembly language, you can output a byte to a port. You can even do that in some C implementations. But to write directly to ports with modern operating systems, you have to have a driver that can get permission from the operating system to own that resource. And you have to get permission from the operating system to let your resourse preemptively issue system-level interrupts.
I guess you could boot in single-user mode, albeit it'd cut off your internet access... ( ;-p )
Good Luck! Rich