use time::local; $pepoch=timelocal(1,1,1,$pday,$pmon,$pyear);