use of uninitialized value $ in pattern match