<?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: ksh scripting to perl in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620801#M816293</link>
    <description>The reason:&lt;BR /&gt;&lt;BR /&gt;'$uid=(stat "x")[4]; $name=getpwuid $uid; open OU,"|mailx -s Data $name"; open IN,"&lt;X&gt;;'&lt;BR /&gt;&lt;BR /&gt;did not work for me is because of the begin&lt;BR /&gt;' and end '&lt;BR /&gt;&lt;BR /&gt;When I took them out it worked.&lt;BR /&gt;&lt;BR /&gt;It's back to the perl books. I have been&lt;BR /&gt;assimilated by ksh too long.&lt;BR /&gt;&lt;BR /&gt;&lt;/X&gt;</description>
    <pubDate>Wed, 07 Sep 2005 15:12:30 GMT</pubDate>
    <dc:creator>jerry1</dc:creator>
    <dc:date>2005-09-07T15:12:30Z</dc:date>
    <item>
      <title>ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620793#M816285</link>
      <description>I am trying to write some perl code to do the&lt;BR /&gt;following from ksh script.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;owner=`ll t | awk '{print $3}'`&lt;BR /&gt;&lt;BR /&gt;cat data.file | mailx -s "Data" $owner&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I am not having much luck and cannot find&lt;BR /&gt;any examples in the book to do the equivalent.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Sep 2005 09:26:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620793#M816285</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2005-09-07T09:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620794#M816286</link>
      <description>Assuming that you have other perl processing to do besides this, it's simple enough to just allow the shell to do it inside the script.&lt;BR /&gt;&lt;BR /&gt;$owner = `ls -l t |awk'{print $3}';&lt;BR /&gt;`cat data.file |mailx -s "Data" $owner`;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Sep 2005 09:39:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620794#M816286</guid>
      <dc:creator>Alan Meyer_4</dc:creator>
      <dc:date>2005-09-07T09:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620795#M816287</link>
      <description>One of many ways (for a file called 'x'):&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;perl -e '$uid=(stat "x")[4]; $name=getpwuid $uid; open OU,"|mailx -s Data $name"; open IN,"&lt;X&gt;;'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here I started the mail process through an open, piping data into it.&lt;BR /&gt;&lt;BR /&gt;Alternatives are 'system()', fork, backtick,....&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/X&gt;</description>
      <pubDate>Wed, 07 Sep 2005 09:43:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620795#M816287</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-09-07T09:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620796#M816288</link>
      <description>Alan, I started with just trying to put&lt;BR /&gt;in the commands as you described. But for&lt;BR /&gt;some reason the "awk" part does not get &lt;BR /&gt;executed and I end up with $owner being the&lt;BR /&gt;total line from the "ll" command and mailx&lt;BR /&gt;trying to send to each field listing from&lt;BR /&gt;the "ll" listing. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hein van den, Your syntax does not show&lt;BR /&gt;any errors but it does not do anything.&lt;BR /&gt;I did change x to t for file name.</description>
      <pubDate>Wed, 07 Sep 2005 10:54:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620796#M816288</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2005-09-07T10:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620797#M816289</link>
      <description>Hi Jerry:&lt;BR /&gt;&lt;BR /&gt;I think Hein meant something like:&lt;BR /&gt;&lt;BR /&gt;# perl -e '$x="/etc/hosts";$uid=(stat $x)[4];$name=getpwuid $uid;open OU,"|mailx -s Data $name";open IN,"&amp;lt;",$x;print OU $_ while &lt;IN&gt;;' &lt;BR /&gt;&lt;BR /&gt;...or slightly more generalized to use a filename as an argument:&lt;BR /&gt;&lt;BR /&gt;# perl -e '$uid=(stat $ARGV[0])[4];$name=getpwuid $uid;open OU,"|mailx -s Data $name";open IN,"&amp;lt;",$ARGV[0];print OU $_ while &lt;IN&gt;;' myfile&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;/IN&gt;&lt;/IN&gt;</description>
      <pubDate>Wed, 07 Sep 2005 11:12:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620797#M816289</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-09-07T11:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620798#M816290</link>
      <description>this works after testing&lt;BR /&gt;&lt;BR /&gt;foreach $LINE (`ls -l *.dat`) {&lt;BR /&gt;   chomp $LINE;&lt;BR /&gt;   @LINE = split " ", $LINE;&lt;BR /&gt;   `cat $LINE[8] |mailx -s Data $LINE[2]`;&lt;BR /&gt;}&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Sep 2005 11:13:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620798#M816290</guid>
      <dc:creator>Alan Meyer_4</dc:creator>
      <dc:date>2005-09-07T11:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620799#M816291</link>
      <description>Hi (again) Jerry &amp;amp; Hein:&lt;BR /&gt;&lt;BR /&gt;Jerry, Hein's original solution DID WORK just fine if you merely substitute the name of your file for "x".  My first cut-and-paste of it mangled it.  The credit is his!&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;/* no points please */</description>
      <pubDate>Wed, 07 Sep 2005 11:20:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620799#M816291</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-09-07T11:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620800#M816292</link>
      <description>&lt;BR /&gt;James is correct, I (over?) simplified the example to test for and send out the same file called "x". I assumed you needed changes anyway to pass in particular file names.&lt;BR /&gt;&lt;BR /&gt;A little more clear perhpas by spreading it out in a script, and using your file names:&lt;BR /&gt;(untested)&lt;BR /&gt;&lt;BR /&gt;$uid=(stat "t")[4];&lt;BR /&gt;$name=getpwuid $uid;&lt;BR /&gt;open OU,"|mailx -s Data $name";&lt;BR /&gt;open IN,"&lt;DATA.FILE&gt;&lt;/DATA.FILE&gt;print OU $_ while &lt;IN&gt;;&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;/IN&gt;</description>
      <pubDate>Wed, 07 Sep 2005 12:20:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620800#M816292</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-09-07T12:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620801#M816293</link>
      <description>The reason:&lt;BR /&gt;&lt;BR /&gt;'$uid=(stat "x")[4]; $name=getpwuid $uid; open OU,"|mailx -s Data $name"; open IN,"&lt;X&gt;;'&lt;BR /&gt;&lt;BR /&gt;did not work for me is because of the begin&lt;BR /&gt;' and end '&lt;BR /&gt;&lt;BR /&gt;When I took them out it worked.&lt;BR /&gt;&lt;BR /&gt;It's back to the perl books. I have been&lt;BR /&gt;assimilated by ksh too long.&lt;BR /&gt;&lt;BR /&gt;&lt;/X&gt;</description>
      <pubDate>Wed, 07 Sep 2005 15:12:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620801#M816293</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2005-09-07T15:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620802#M816294</link>
      <description>Slowly I am piecing it together.&lt;BR /&gt;&lt;BR /&gt;It runs but I am getting this error message &lt;BR /&gt;on one line. The line is:&lt;BR /&gt;&lt;BR /&gt;my $name=getpwuid ($uid);&lt;BR /&gt;&lt;BR /&gt;The error message is:&lt;BR /&gt;&lt;BR /&gt;Use of uninitialized value in getpwuid at script1 line 33. &lt;BR /&gt;&lt;BR /&gt;Why??&lt;BR /&gt;&lt;BR /&gt;The script is enclosed if anyone wants to&lt;BR /&gt;use it, look at it. The code given by all &lt;BR /&gt;here was used in a script I wrote using the perl Net::FTP module.&lt;BR /&gt;It was the only was I could trap error messages.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Sep 2005 09:22:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620802#M816294</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2005-09-08T09:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620803#M816295</link>
      <description>$uid is not defined. You're sure to use the right syntax? Are you using strict and warnings? If not, you should.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;&lt;BR /&gt;No script enclose as far as I can see&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Thu, 08 Sep 2005 10:24:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620803#M816295</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-09-08T10:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620804#M816296</link>
      <description>Blast! Here is the script again here and&lt;BR /&gt;trying to enclose again.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl &lt;BR /&gt;&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;use Net::FTP;&lt;BR /&gt;use Net::Netrc;&lt;BR /&gt;my $server="host1";&lt;BR /&gt;my $file="data.file";&lt;BR /&gt;my $destination = "/";&lt;BR /&gt;my $pageid = "admins";&lt;BR /&gt;my $pager = "/usr/local/bin/pager";&lt;BR /&gt;my $ftpid = "user2";&lt;BR /&gt;my $pass = "xyzzy";&lt;BR /&gt;&lt;BR /&gt;my $ftp = Net::FTP-&amp;gt;new ($server, Timeout =&amp;gt; 9000, Debug =&amp;gt; 3) or die (exec "$pager $pageid \"$server: ftp AP cannot connect: $@\"") ; &lt;BR /&gt;&lt;BR /&gt;$ftp-&amp;gt;login("$ftpid","$pass") or die (exec "$pager $pageid \"ftp AP cannot login.\"") ; &lt;BR /&gt;&lt;BR /&gt;$ftp-&amp;gt;binary or die (exec "$pager $pageid \"ftp AP failed binary mode.\"") ;&lt;BR /&gt;&lt;BR /&gt;$ftp-&amp;gt;cwd ($destination) or die (exec "$pager $pageid \"ftp AP failed cwd.\"") ;&lt;BR /&gt;&lt;BR /&gt;$ftp-&amp;gt;put ($file) or die (exec "$pager $pageid \"ftp AP cannot put file.  \"") ;&lt;BR /&gt;&lt;BR /&gt;$ftp-&amp;gt;quit;&lt;BR /&gt;&lt;BR /&gt;my $date = "date +%Y%m%d%H%M";&lt;BR /&gt;my $uid=(stat "originalfile.$date")[4];&lt;BR /&gt;my $name=getpwuid ($uid);&lt;BR /&gt;open OU,"|mailx -s \"AP file sent to Citibank\" $name"; open IN,"data.file"; print OU $_ while &lt;IN&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/IN&gt;</description>
      <pubDate>Thu, 08 Sep 2005 10:49:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620804#M816296</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2005-09-08T10:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620805#M816297</link>
      <description>my $date = "date +%Y%m%d%H%M";&lt;BR /&gt;my $uid = (stat "originalfile.$date")[4];&lt;BR /&gt;my $name = getpwuid $uid;&lt;BR /&gt;&lt;BR /&gt;if "originalfile.$date" does not exist, a stat () call on it will return undef in the user field, so maybe you will need to bail out if the file does not exist at all and then find out *why* it does not exist&lt;BR /&gt;&lt;BR /&gt;my $date = "date +%Y%m%d%H%M";&lt;BR /&gt;my $org_file = "originalfile.$date";&lt;BR /&gt;-f $org_file or die "$org_file does not exist";&lt;BR /&gt;my $uid = (stat $org_file)[4];&lt;BR /&gt;my $name = getpwuid $uid;&lt;BR /&gt;&lt;BR /&gt;or maybe you just wanted to stat () on $file instead&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Thu, 08 Sep 2005 11:07:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620805#M816297</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-09-08T11:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620806#M816298</link>
      <description>Dang!&lt;BR /&gt;&lt;BR /&gt;I took out %H%M from $date =&lt;BR /&gt;And touched a file ttt.`date +%Y%m%d`&lt;BR /&gt;But it still gives me the error:&lt;BR /&gt;&lt;BR /&gt;Use of uninitialized value in getpwuid at aa line 33.&lt;BR /&gt;&lt;BR /&gt;If I just touch the file name ttt and&lt;BR /&gt;change the code to only have ttt in:&lt;BR /&gt;&lt;BR /&gt;my $uid = (stat "ttt")[4];&lt;BR /&gt;&lt;BR /&gt;It works.&lt;BR /&gt;&lt;BR /&gt;It has something to do with .$date in:&lt;BR /&gt;&lt;BR /&gt;my $uid = (stat "ttt.$date")[4];&lt;BR /&gt;&lt;BR /&gt;??&lt;BR /&gt;&lt;BR /&gt;Does anyone know how to run debug with -d&lt;BR /&gt;-w. I can't seen to get anything meaningful&lt;BR /&gt;from it?&lt;BR /&gt;&lt;BR /&gt;I can't get anything enclosed also in these&lt;BR /&gt;posts. I use Browse and open the file. It&lt;BR /&gt;shows G:\script1 in the attachment box but&lt;BR /&gt;does not get posted. Any clues for the clueless here?</description>
      <pubDate>Thu, 08 Sep 2005 11:41:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620806#M816298</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2005-09-08T11:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620807#M816299</link>
      <description>Hi Jerry:&lt;BR /&gt;&lt;BR /&gt;You need to use back-ticks to surround your date; not double quote marks.  Thus:&lt;BR /&gt;&lt;BR /&gt;my $ date = `date +%Y%m%d%H%M`;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 08 Sep 2005 11:45:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620807#M816299</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-09-08T11:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620808#M816300</link>
      <description>James, tried that already. I get:&lt;BR /&gt;&lt;BR /&gt;Unsuccessful stat on filename containing newline at script1 line 32.&lt;BR /&gt;Use of uninitialized value in getpwuid at script1 line 33.</description>
      <pubDate>Thu, 08 Sep 2005 12:12:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620808#M816300</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2005-09-08T12:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620809#M816301</link>
      <description>Hi Jerry:&lt;BR /&gt;&lt;BR /&gt;my $date = `date +%Y%m`;&lt;BR /&gt;chomp $date;&lt;BR /&gt;my $uid=(stat("/tmp/stuff.200509"))[4];&lt;BR /&gt;&lt;BR /&gt;Note the 'chomp' of the newline delivered back from the 'date()'.  That fixes stat() complaining.&lt;BR /&gt;&lt;BR /&gt;Note the additional parentheses for the list context of the slice.  That allows a value to be returned to $uid which then satisfies getpwuid().&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 08 Sep 2005 12:34:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620809#M816301</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-09-08T12:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620810#M816302</link>
      <description>Hi (again) Jerry:&lt;BR /&gt;&lt;BR /&gt;Oops, forget my addition of the additional parenthesis with the stat() call.  The 'chomp' fixes both of your errors!&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;/* no points for this correction */</description>
      <pubDate>Thu, 08 Sep 2005 12:54:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620810#M816302</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-09-08T12:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620811#M816303</link>
      <description>And indeed it does work. I was wondering about the chomp.&lt;BR /&gt;&lt;BR /&gt;Thanks James.</description>
      <pubDate>Thu, 08 Sep 2005 13:23:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620811#M816303</guid>
      <dc:creator>jerry1</dc:creator>
      <dc:date>2005-09-08T13:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: ksh scripting to perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620812#M816304</link>
      <description>my $date = `date +%Y%m%d%H%M`;&lt;BR /&gt;&lt;BR /&gt;is not very perlish&lt;BR /&gt;&lt;BR /&gt;Perl has two native ways:&lt;BR /&gt;&lt;BR /&gt;my @date = localtime;&lt;BR /&gt;my $date = sprintf "%4d%02d%02d%02d%02d", $date[5] + 1900, $date[4] + 1, @date[3,2,1];&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;use POSIX qw( strftime );&lt;BR /&gt;my $date = strftime ("%Y%m%d%H%M", localtime);&lt;BR /&gt;&lt;BR /&gt;the first is completely native and most likely the fastest.&lt;BR /&gt;Neither needs chomp :)&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Thu, 08 Sep 2005 14:08:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-scripting-to-perl/m-p/3620812#M816304</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-09-08T14:08:39Z</dc:date>
    </item>
  </channel>
</rss>

