export the variable and use $ENV:
sk@sk:~$ export MYDATESTAMP="2009-06-25 21:57:18"
sk@sk:~$ perl -MDate::Parse -le'print str2time($ENV{"MYDATESTAMP"});'
1245981438
Reputation Points: 1749
Solved Threads: 735
Senior Poster
Offline 3,948 posts
since Feb 2009