fixed shift() for < 5.14 perl