I have defined a variable in bash
$ MYDATESTAMP="2009-06-25 21:57:18"
I would like to pass this to perl to perform a simple date conversion.
If I enter the date manually it works.
$ perl -MDate::Parse -le'print str2time("2009-06-25 21:57:18");' $ 1245992238
My attempts to pass the variable MYDATESTAMP into this command it returns nothing.
$ perl -MDate::Parse -le'print str2time("$MYDATESTAMP");'
How can this be done?