<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Another Perl Question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/another-perl-question/m-p/2816952#M720825</link>
    <description>get('development.exp.' . $today)&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;&lt;BR /&gt;my $xxvar = sprintf("development.exp.%s",$today);&lt;BR /&gt;get($xxvar);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;either way will work. You were trying to concatenate inside quotes and that dog won't hunt.&lt;BR /&gt;</description>
    <pubDate>Tue, 01 Oct 2002 17:18:34 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2002-10-01T17:18:34Z</dc:date>
    <item>
      <title>Another Perl Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-perl-question/m-p/2816950#M720823</link>
      <description>I am trying to get the following code to work.  It works fine if I hard code the file to get on the ftp get line (development.exp.100102).  When I try to use the variables populated with the date it no longer works.  How can you use Net::FTP and still use variable names?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jason&lt;BR /&gt;&lt;BR /&gt;use Net::FTP;&lt;BR /&gt;&lt;BR /&gt;chomp ($today=`date /T`);&lt;BR /&gt;$today =~ s/\D//g;&lt;BR /&gt;$year = substr($today,6,2);&lt;BR /&gt;$monthday = substr($today,0,4);&lt;BR /&gt;$today = "$monthday$year";&lt;BR /&gt;&lt;BR /&gt;$ftp = Net::FTP-&amp;gt;new("ftpserver");&lt;BR /&gt;die "Could not connect: $!" unless $ftp;&lt;BR /&gt;$ftp-&amp;gt;login('anonymous', 'myemail'); &lt;BR /&gt;$ftp-&amp;gt;cwd('/pub');        &lt;BR /&gt;$ftp-&amp;gt;get('development.exp.$today');&lt;BR /&gt;$ftp-&amp;gt;quit();&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Oct 2002 17:10:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-perl-question/m-p/2816950#M720823</guid>
      <dc:creator>Jason Berendsen</dc:creator>
      <dc:date>2002-10-01T17:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Another Perl Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-perl-question/m-p/2816951#M720824</link>
      <description>Change&lt;BR /&gt;$ftp-&amp;gt;get('development.exp.$today'); &lt;BR /&gt;&lt;BR /&gt;to&lt;BR /&gt;$ftp-&amp;gt;get("development.exp.$today"); &lt;BR /&gt;&lt;BR /&gt;single quotes within perl will not do data interpolation. Double quotes do...&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Oct 2002 17:15:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-perl-question/m-p/2816951#M720824</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-10-01T17:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Another Perl Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-perl-question/m-p/2816952#M720825</link>
      <description>get('development.exp.' . $today)&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;&lt;BR /&gt;my $xxvar = sprintf("development.exp.%s",$today);&lt;BR /&gt;get($xxvar);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;either way will work. You were trying to concatenate inside quotes and that dog won't hunt.&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Oct 2002 17:18:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-perl-question/m-p/2816952#M720825</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-10-01T17:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Another Perl Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-perl-question/m-p/2816953#M720826</link>
      <description>I should have caught that one.  Thanks for the help.</description>
      <pubDate>Tue, 01 Oct 2002 17:19:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-perl-question/m-p/2816953#M720826</guid>
      <dc:creator>Jason Berendsen</dc:creator>
      <dc:date>2002-10-01T17:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Another Perl Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/another-perl-question/m-p/2816954#M720827</link>
      <description>Hi again Jason:&lt;BR /&gt;&lt;BR /&gt;I might as well tell you that you should also use the status method to get the status of your last FTP operation. You are really not using Net::FTP to its full advantage if you don't do the very easy error checking.&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;&lt;BR /&gt;use constant GOOD_XFER =&amp;gt; 2;&lt;BR /&gt;&lt;BR /&gt;$ftp-&amp;gt;get($fname);&lt;BR /&gt;my $stat = $ftp-&amp;gt;status;&lt;BR /&gt;if ($stat != GOOD_XFER)&lt;BR /&gt;{&lt;BR /&gt;  printf("Get failed. Status %d\n",$stat);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;  printf("Everything OK!!!\n");&lt;BR /&gt;}&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Oct 2002 17:33:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/another-perl-question/m-p/2816954#M720827</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-10-01T17:33:44Z</dc:date>
    </item>
  </channel>
</rss>

