<?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: Perl in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960634#M118243</link>
    <description>use File::Find;&lt;BR /&gt;open F,"&amp;lt; /tmp/file.lck" or die "Can't open /tmp/file.lck $!";&lt;BR /&gt;       my  $size = (lstat(F))[7];&lt;BR /&gt;        print "The Size is : $sizei\n";&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 28 Apr 2003 13:38:57 GMT</pubDate>
    <dc:creator>Paddy_1</dc:creator>
    <dc:date>2003-04-28T13:38:57Z</dc:date>
    <item>
      <title>Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960631#M118240</link>
      <description>Hi list,&lt;BR /&gt;How do I get the similar result using Perl.&lt;BR /&gt;APLF=`ls -l /tmp/file.lck |awk '{print $5}' |cut -d: -f1`&lt;BR /&gt;I am trying to get size of a file.&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Mon, 28 Apr 2003 13:21:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960631#M118240</guid>
      <dc:creator>rgoud</dc:creator>
      <dc:date>2003-04-28T13:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960632#M118241</link>
      <description>use the "lstat" command to get the required field</description>
      <pubDate>Mon, 28 Apr 2003 13:32:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960632#M118241</guid>
      <dc:creator>Paddy_1</dc:creator>
      <dc:date>2003-04-28T13:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960633#M118242</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Here is one way to do it in Perl:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl -w&lt;BR /&gt;&lt;BR /&gt;use File::stat;&lt;BR /&gt;&lt;BR /&gt;$inode = stat("/tmp/file.lck");&lt;BR /&gt;$size = $inode-&amp;gt;size;&lt;BR /&gt;print "Size of /tmp/file.lck is : $size\n";&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 28 Apr 2003 13:34:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960633#M118242</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2003-04-28T13:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960634#M118243</link>
      <description>use File::Find;&lt;BR /&gt;open F,"&amp;lt; /tmp/file.lck" or die "Can't open /tmp/file.lck $!";&lt;BR /&gt;       my  $size = (lstat(F))[7];&lt;BR /&gt;        print "The Size is : $sizei\n";&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 28 Apr 2003 13:38:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960634#M118243</guid>
      <dc:creator>Paddy_1</dc:creator>
      <dc:date>2003-04-28T13:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960635#M118244</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;perl -e 'print -s shift,"\n"' /tmp/file.lck&lt;BR /&gt;&lt;BR /&gt;rgds, Robin</description>
      <pubDate>Mon, 28 Apr 2003 13:43:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960635#M118244</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2003-04-28T13:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960636#M118245</link>
      <description>or&lt;BR /&gt;APLF=`ls -l /tmp/file.lck|perl -e 'while (&amp;lt;&amp;gt;) {print +(split)[4],"\n"}'`</description>
      <pubDate>Mon, 28 Apr 2003 13:44:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960636#M118245</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2003-04-28T13:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960637#M118246</link>
      <description>John, using the OO interface to stat (File::Stat) is maybe easy to read, but a big luggish to use in perl one liners.&lt;BR /&gt;&lt;BR /&gt;Paddy, why use File::Find if you don't use it?&lt;BR /&gt;&lt;BR /&gt;Robin, your post is the best and very correct (as it usually is :), but it can be shorter using the -l command line option, which is very underused:&lt;BR /&gt;&lt;BR /&gt;# perl -le 'print -s shift' /tmp/file.lck&lt;BR /&gt;&lt;BR /&gt;Or even shorter for more files&lt;BR /&gt;&lt;BR /&gt;a5:/u/usr/merijn 103 &amp;gt; perl -le'print-s,$_ for@ARGV' /tmp/xx.txt /tmp/xx.uit&lt;BR /&gt;29502/tmp/xx.txt&lt;BR /&gt;1230/tmp/xx.uit&lt;BR /&gt;a5:/u/usr/merijn 104 &amp;gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Tue, 29 Apr 2003 09:18:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960637#M118246</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-04-29T09:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960638#M118247</link>
      <description>Hi Merijn,&lt;BR /&gt;&lt;BR /&gt;You're right of course, always forgot about that one, although if you're assigning to a variable, you don't need the return anyway :)&lt;BR /&gt;&lt;BR /&gt;Robin</description>
      <pubDate>Tue, 29 Apr 2003 09:40:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl/m-p/2960638#M118247</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2003-04-29T09:40:27Z</dc:date>
    </item>
  </channel>
</rss>

