Actually, it should be $class eq "Warrior" with double quotes. Using single quotes is an array of char's, while double quotes is used for strings. Maybe why it didn't work. I like the way you do it now with the hashes. That's pretty slick. I love perl.
|