First identify where @dmy gets assigned, and how. Then inspect what data it gets assigned from. Maybe you want to check that the data you assign from matches your expectations. It's not hard and it has little to do with Perl programming and more to do with general debugging.