a simple switch statement for perl