title: Perl: how to make date as argument to perl script
body: <p>Manually I run script from terminal like this:</p>
  
  <pre><code># perl renew.pl 2014-06-09 data.xml
  </code></pre>
  
  <p>where 2014-06-09 is today's date and data.xml is file which script updates.</p>
  
  <p>I'd like to run this script with cron, so I need inserting current date automatically.
  I've tried something like  </p>
  
  <pre><code># perl renew.pl date +"%Y/%m/%d" data.xml &lt;br&gt;
  or &lt;br&gt;
  # perl renew.pl 'date +"%Y/%m/%d"' data.xml&lt;br&gt;
  or &lt;br&gt;
  # TODAY=`date '+%Y%m%d'`; perl renew.pl TODAY data.xml
  </code></pre>
  
  <p>But always got response like:</p>
  
  <p><em>Use of uninitialized value in numeric ge (>=) at /usr/lib/perl5/site_perl/5.8.8/Date/Calc/PP.pm line 1547,  line
  523. Date::Calc::PP::Add_Delta_Days(): Date::Calc::Add_Delta_Days(): not a valid date at renew.pl</em></p>
  
  <p>Are there any other variants to insert date as arguments? </p>