make this work for older version of perl