fixed warnings for perl 5.12 or later