title: Generate dynamic file name list
body: <p>I started programming in perl few months back and this is my first question on stackoverflow.com. I hope I can get a solution. </p>
  
  <p>So I want to copy some files from an ftp server. The file names are in this format:</p>
  
  <pre><code>abc_201149_cde_07_fgh_include_internal 
  </code></pre>
  
  <p>In this example the numeric part gets changed on weekly basis, e.g. 201149 says year = 2011 and week = 49. Similarly, 07 says which version it is. </p>
  
  <p>I have copied all the file names into one file called "sdk_link.txt" and I am reading each file name from this and then copying to my local PC:</p>
  
  <pre><code>use Net::FTP;
  use File::Copy;
  $Login = "&lt;redacted&gt;";
  $Pwd = "&lt;redacted&gt;";
  $ftpHost = "&lt;redacted&gt;";
  $ftpFolder = "/daj/dhakj/ahdakl/abc_201206_def_05";
  $ftp=Net::FTP-&gt;new($ftpHost,Timeout=&gt;100);
  if ($ftp) 
  {
      print $ftp-&gt;message;
  }
  $ftp-&gt;login($Login,$Pwd);
  print $ftp-&gt;message;
  $ftp-&gt;cwd($ftpFolder);
  print $ftp-&gt;message;
  open FILE,"sdk_link.txt" or die $!;
  while($test=&lt;FILE&gt;) 
  {
      chomp($test);
      #Copy the file
      copy("$test","/testing"); 
  }
  $ftp-&gt;quit;
  </code></pre>
  
  <p>I want to run this script every week on Windows. How can I make the numeric part change so that the correct files get downloaded?</p>