<?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: Using df -k on Perl in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517847#M701239</link>
    <description>Thanks&lt;BR /&gt;&lt;BR /&gt;I have assigned the array now to a second array and then substituted the % sign with //.&lt;BR /&gt;This works, but is there a simpler and quicker way to do so.&lt;BR /&gt;I get an error message that 46% is not a numeric value.</description>
    <pubDate>Tue, 05 Apr 2005 06:28:11 GMT</pubDate>
    <dc:creator>Steve_617</dc:creator>
    <dc:date>2005-04-05T06:28:11Z</dc:date>
    <item>
      <title>Using df -k on Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517845#M701237</link>
      <description>I have sent a df -k to a tmp1 file&lt;BR /&gt;I then try and loop through the file and send each line to an aray.&lt;BR /&gt;I then want to print out the % field and do a test to see if the disk space is greater than 80% so I can perform a task on that, but for some reason when I split the array using qw(@aray_name), it does not give me any data.&lt;BR /&gt;&lt;BR /&gt;Any advice</description>
      <pubDate>Tue, 05 Apr 2005 04:21:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517845#M701237</guid>
      <dc:creator>Steve_617</dc:creator>
      <dc:date>2005-04-05T04:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using df -k on Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517846#M701238</link>
      <description>qw(@array) will return a list with ONE element: '@array'&lt;BR /&gt;&lt;BR /&gt;qw// will Quote Words: any sequence of non blanks is considered a word in that, except the ',' for which you will probably get a warning&lt;BR /&gt;&lt;BR /&gt;what you probably meant was to split up each line into fields, where the fields are seperated by spaces:&lt;BR /&gt;&lt;BR /&gt;my @list = split /\s+/;&lt;BR /&gt;&lt;BR /&gt;In a more full context:&lt;BR /&gt;&lt;BR /&gt;local @ARGV = ("df -k |");&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt; my @f = split /\s+/;&lt;BR /&gt; $f[5] &amp;gt; 80 and print;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt;HTH, Enjoy, Have FUN! H.Merijn&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Apr 2005 06:17:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517846#M701238</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-04-05T06:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using df -k on Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517847#M701239</link>
      <description>Thanks&lt;BR /&gt;&lt;BR /&gt;I have assigned the array now to a second array and then substituted the % sign with //.&lt;BR /&gt;This works, but is there a simpler and quicker way to do so.&lt;BR /&gt;I get an error message that 46% is not a numeric value.</description>
      <pubDate>Tue, 05 Apr 2005 06:28:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517847#M701239</guid>
      <dc:creator>Steve_617</dc:creator>
      <dc:date>2005-04-05T06:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using df -k on Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517848#M701240</link>
      <description>That's GOOD! You are using warnings!&lt;BR /&gt;That is a bonus for you.&lt;BR /&gt;&lt;BR /&gt;local @ARGV = ("df -k |");&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;my @f = split /\s+/;&lt;BR /&gt;$f[5] =~ m/(\d+)/ &amp;amp;&amp;amp; $1 &amp;gt; 80 and print;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;is a cleaner way, or you can use the less maintainable way of looking at the value in string context:&lt;BR /&gt;&lt;BR /&gt;local @ARGV = ("df -k |");&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;my @f = split /\s+/;&lt;BR /&gt;$f[5] =~ m/^([89]\d|1\d\d)%$/ and print;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;this will match all percentages from 80 and up.&lt;BR /&gt;&lt;BR /&gt;FYI the *dirty* way to get rid of this warning (since you know it is OK) is to (temporarily) disable warning:&lt;BR /&gt;&lt;BR /&gt;local @ARGV = ("df -k |");&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;my @f = split /\s+/;&lt;BR /&gt;no warnings;&lt;BR /&gt;$f[5] &amp;gt; 80 and print;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Tue, 05 Apr 2005 06:44:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517848#M701240</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-04-05T06:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using df -k on Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517849#M701241</link>
      <description>Why can I not do the following&lt;BR /&gt;&lt;BR /&gt;local @ARGV = ("df -k |");&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;my @f = split /\s+/;&lt;BR /&gt;$f[5]=~tr/\%//g and print; ### my changes&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;My goal is to have an output&lt;BR /&gt; /usr 88%&lt;BR /&gt; /var 94%</description>
      <pubDate>Tue, 05 Apr 2005 07:00:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517849#M701241</guid>
      <dc:creator>Steve_617</dc:creator>
      <dc:date>2005-04-05T07:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using df -k on Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517850#M701242</link>
      <description>If that's your goal, why not simply&lt;BR /&gt;&lt;BR /&gt;local @ARGV = ("df -k |");&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;my @f = split /\s+/;&lt;BR /&gt;print "@f[0,5]\n";&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;local @ARGV = ("df -k |");&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;print +(split/\s+/)[0,5],"\n";&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Tue, 05 Apr 2005 07:03:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517850#M701242</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-04-05T07:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using df -k on Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517851#M701243</link>
      <description>that 0,5 should be 1,5 in your case, where you want to see the mount point, and not the locical volume.&lt;BR /&gt;&lt;BR /&gt;From the command line, that might even shorter look like:&lt;BR /&gt;&lt;BR /&gt;a5:/u/usr/merijn 105 &amp;gt; df -k | perl -anle'print"@F[1,5]"'&lt;BR /&gt;Mount %used&lt;BR /&gt;/ 17%&lt;BR /&gt;/data 57%&lt;BR /&gt;/home 8%&lt;BR /&gt;/opt 95%&lt;BR /&gt;/pro 97%&lt;BR /&gt;/stand 26%&lt;BR /&gt;/tmp 8%&lt;BR /&gt;/u 50%&lt;BR /&gt;/usr 86%&lt;BR /&gt;/var 13%&lt;BR /&gt;/wrk 67%&lt;BR /&gt;a5:/u/usr/merijn 106 &amp;gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Tue, 05 Apr 2005 07:09:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517851#M701243</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-04-05T07:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using df -k on Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517852#M701244</link>
      <description>Just to come back to my previous question.&lt;BR /&gt;Why can I not do the following&lt;BR /&gt;&lt;BR /&gt;local @ARGV = ("df -k |");&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;my @f = split /\s+/;&lt;BR /&gt;$f[5]=~tr/\%//g &amp;gt; 80 and print; ### my changes&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;I would like to print all the parttions greater than 80% but in the format &lt;BR /&gt;/usr  80%&lt;BR /&gt;/var 92%</description>
      <pubDate>Tue, 05 Apr 2005 08:40:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517852#M701244</guid>
      <dc:creator>Steve_617</dc:creator>
      <dc:date>2005-04-05T08:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using df -k on Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517853#M701245</link>
      <description>firstly because tr does not give you back the value of the variable changed, but it returns the number of characters changed&lt;BR /&gt;secondly because tr/// is not the same as s/// and tr/// does not recognize the /g option (tr/// or the equivalent y/// only know of the options 'c' - complement the search list, 'd' - delete found but unreplaced characters, and 's' - squash duplicate replaced characters.&lt;BR /&gt;&lt;BR /&gt;local @ARGV = ("df -k |");&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;my @f = split /\s+/;&lt;BR /&gt;$f[5]=~tr/\%//g &amp;gt; 80 and print; ### my changes&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;that's why I gave you the second example&lt;BR /&gt;&lt;BR /&gt;local @ARGV = ("df -k |");&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;my @f = split /\s+/;&lt;BR /&gt;$f[5] =~ m/(\d+)/ &amp;amp;&amp;amp; $1 &amp;gt; 80 and print;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;but if you prefer to delete the '%' from the original string, you'd better do&lt;BR /&gt;&lt;BR /&gt;local @ARGV = ("df -k |");&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;my @f = split /\s+/;&lt;BR /&gt;$f[5] =~ tr/%//d &amp;amp;&amp;amp; $f[5] &amp;gt; 80 and print;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Tue, 05 Apr 2005 08:49:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517853#M701245</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-04-05T08:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using df -k on Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517854#M701246</link>
      <description>Thanks for all your help.&lt;BR /&gt;The first to responses gave me an option to give your help a rating, however I the last few replies there is no option to rate your responses..&lt;BR /&gt;&lt;BR /&gt;If I may ask you what does the pipe do after df -k |.&lt;BR /&gt;&lt;BR /&gt;I have just done a PErl course at HP but it seems I still have a long way to go, as I don't recognise most of the stuff you have shown me&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Steve</description>
      <pubDate>Wed, 06 Apr 2005 00:50:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517854#M701246</guid>
      <dc:creator>Steve_617</dc:creator>
      <dc:date>2005-04-06T00:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using df -k on Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517855#M701247</link>
      <description>Being a perl5 porter (someone in the perl5 source code maintainer team), I probably know more about Perl than the avarage perl scripter here on the forum, so don't feel bad about it when you see `new' things. I tend to use what I know.&lt;BR /&gt;&lt;BR /&gt;The pipe however is a `standard' feature.&lt;BR /&gt;&lt;BR /&gt;open my $pipe, "command |" or die "cannot pipe: $!";&lt;BR /&gt;&lt;BR /&gt;opens a pipe from the executed "command", which can be any unix command - like ps, who,  ls, du, bdf, ..., and pipes it output to the handle you opened it to ($pipe). Now when you read from $pipe, like in&lt;BR /&gt;&lt;BR /&gt;my $line = &amp;lt;$pipe&amp;gt;;&lt;BR /&gt;&lt;BR /&gt;the line is the next line as generated by the pipe command.&lt;BR /&gt;&lt;BR /&gt;You can learn more about it in the perl man pages:&lt;BR /&gt;&lt;BR /&gt;man perlfunc&lt;BR /&gt;man perlopentut&lt;BR /&gt;perldoc -f open&lt;BR /&gt;&lt;BR /&gt;If  you show up as "Author", I don't know why you cannot assign points. Do you need help? We can get help from HP people on anything causing trouble in the forum.&lt;BR /&gt;&lt;BR /&gt;HTH, Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Wed, 06 Apr 2005 02:29:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517855#M701247</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-04-06T02:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using df -k on Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517856#M701248</link>
      <description>HERE IS MY SCRIPT AND ITS OUTPUT&lt;BR /&gt;#!/usr/bin/perl -w&lt;BR /&gt;`df -k &amp;gt; /tmp/tmp2`;&lt;BR /&gt;open RF, "&amp;lt; /tmp/tmp2";&lt;BR /&gt;while($line=&lt;RF&gt;)&lt;BR /&gt;{&lt;BR /&gt;@LIST=(split/\s+/,($line)) ;&lt;BR /&gt;@STEVE=($LIST[4])=~s/\%//;&lt;BR /&gt;#print @STEVE,"\n";&lt;BR /&gt;if ($LIST[4]&amp;gt;80)&lt;BR /&gt;{&lt;BR /&gt;print "BIG PROBLEM  ";&lt;BR /&gt;print $LIST[5]," ",$LIST[4],"\n";&lt;BR /&gt;}&lt;BR /&gt;elsif ($LIST[4]&amp;gt;30 )&lt;BR /&gt;{&lt;BR /&gt;print "LITTLE PROBLEM  ";&lt;BR /&gt;print $LIST[5]," ",$LIST[4],"\n";&lt;BR /&gt;}&lt;BR /&gt;elsif  ($LIST[4]&amp;gt;0 )&lt;BR /&gt;{&lt;BR /&gt;print "NO  PROBLEM  ";&lt;BR /&gt;print $LIST[5]," ",$LIST[4],"\n";&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;close RF;&lt;BR /&gt;$SS=`ps -ef |grep csi |grep SpectroSERVER |grep -v grep`;&lt;BR /&gt;$ARC=`ps -ef |grep csi |grep ArchMgr |grep -v grep`;&lt;BR /&gt;$VBOA=`ps -ef |grep csi |grep VBOA |grep -v grep`;&lt;BR /&gt;$LOC=`ps -ef |grep csi |grep LocServer |grep -v grep`;&lt;BR /&gt;$SDPM=`ps -ef |grep csi |grep processd |grep -v grep`;&lt;BR /&gt;print $SS,"\n";&lt;BR /&gt;print $ARC,"\n";&lt;BR /&gt;print $VBOA,"\n";&lt;BR /&gt;print $LOC,"\n";&lt;BR /&gt;print $SDPM,"\n";&lt;BR /&gt;exit;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;AND THE OUTPUT&lt;BR /&gt;$ ./Test1.pl&lt;BR /&gt;Name "main::STEVE" used only once: possible typo at ./Test1.pl line 7.&lt;BR /&gt;Argument "capacity" isn't numeric in numeric gt (&amp;gt;) at ./Test1.pl line 9, &lt;RF&gt; line 1.&lt;BR /&gt;NO  PROBLEM  / 4&lt;BR /&gt;LITTLE PROBLEM  /usr 43&lt;BR /&gt;NO  PROBLEM  /var 12&lt;BR /&gt;NO  PROBLEM  /var/run 1&lt;BR /&gt;NO  PROBLEM  /tmp 1&lt;BR /&gt;NO  PROBLEM  /home1 6&lt;BR /&gt;NO  PROBLEM  /csi 7&lt;BR /&gt;BIG PROBLEM  /swap 100&lt;BR /&gt;NO  PROBLEM  /export/home 21&lt;BR /&gt;BIG PROBLEM  /cd1 100&lt;BR /&gt;spectrum  8520  8488  1   Mar 18 ?       322:25 /csi/spectrum/SS/SpectroSERVER&lt;BR /&gt;&lt;BR /&gt;spectrum  8531  8488  0   Mar 18 ?        7:25 /csi/spectrum/SS/DDM/ArchMgr&lt;BR /&gt;&lt;BR /&gt;spectrum  8513  8488  0   Mar 18 ?        0:05 /csi/spectrum/bin/VBOA/osagent&lt;BR /&gt;&lt;BR /&gt;spectrum  8497  8488  0   Mar 18 ?        0:05 /csi/spectrum/LS/LocServer&lt;BR /&gt;&lt;BR /&gt;    root  8488     1  0   Mar 18 ?        0:06 /csi/spectrum/lib/SDPM/processd --start&lt;BR /&gt;&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;BAR THE ERROR AT THE TOP IT GIVES ME WHAT I WANT BUT ITS VERY CLUMBSY COMPARED TO YOUR EXAMPLE. WHAT I DO ABOVE IS EASY TO DO IN KORN BUT I WOULD LIKE TO GET TO KNOW THE POWER OF PERL, THAT IS WHY I WOULD LIKE TO DO IT IN PERL!!!&lt;BR /&gt;ANY SUGESTIONS&lt;BR /&gt;&lt;/RF&gt;&lt;/RF&gt;</description>
      <pubDate>Wed, 06 Apr 2005 03:23:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517856#M701248</guid>
      <dc:creator>Steve_617</dc:creator>
      <dc:date>2005-04-06T03:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using df -k on Perl</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517857#M701249</link>
      <description>Without looking deeper, first thing I'd do is a small rewrite to safer code.&lt;BR /&gt;&lt;BR /&gt;1. Don't use full-caps variables unless they serve a special cause&lt;BR /&gt;2. use strict;&lt;BR /&gt;3. use lexicals (my $var)&lt;BR /&gt;4. prevent duplicate code (the list of greps)&lt;BR /&gt;5. @STEVE is a list $STEVE is a scalar&lt;BR /&gt;6. use whitespace ($var &amp;gt; 80)&lt;BR /&gt;7. use interpolation where appropriate "blah $var foo"&lt;BR /&gt;8. prevent external files if possible (open)&lt;BR /&gt;9. use builtin functions instead of external processes (grep)&lt;BR /&gt;&lt;BR /&gt;--8&amp;lt;---&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;&lt;BR /&gt;open my $rf, "df -k |";&lt;BR /&gt;while (&amp;lt;$rf&amp;gt;) {&lt;BR /&gt;my @list = split /\s+/;&lt;BR /&gt;(my $steve = $list[4]) =~s/\%//; # Look at this change closely&lt;BR /&gt;#print "$steve\n";&lt;BR /&gt;if ($steve &amp;gt; 80) {&lt;BR /&gt;print "BIG PROBLEM $list[5] $list[4]\n";&lt;BR /&gt;}&lt;BR /&gt;elsif ($steve &amp;gt; 30) {&lt;BR /&gt;print "LITTLE PROBLEM $list[5] $list[4]\n";&lt;BR /&gt;}&lt;BR /&gt;elsif ($steve &amp;gt; 0) {&lt;BR /&gt;print "NO PROBLEM $list[5] $list[4]\n";&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;close $rf;&lt;BR /&gt;&lt;BR /&gt;# I'd personally use Proc::ProcessTable&lt;BR /&gt;chomp (my @ps = grep m/csi/ =&amp;gt; `ps -ef`);&lt;BR /&gt;my @ss = grep /SpectroSERVER/, @ps;&lt;BR /&gt;my @arc = grep /ArchMgr/, @ps;&lt;BR /&gt;my @vboa = grep /VBOA/, @ps;&lt;BR /&gt;my @loc = grep /LocServer/, @ps;&lt;BR /&gt;my @sdpm = grep /processd/, @ps;&lt;BR /&gt;&lt;BR /&gt;print @ss, "\n", @arc, "\n", @vboa, "\n", @loc, "\n", @sdpm, "\n";&lt;BR /&gt;--&amp;gt;8---&lt;BR /&gt;&lt;BR /&gt;The latter part, presuming you want these processes to be printed, could more ligible be written as&lt;BR /&gt;&lt;BR /&gt;print grep /\b(SpectroSERVER|ArchMgr|VBOA|LocServer|processd)\b/ =&amp;gt; `ps -ef`;&lt;BR /&gt;&lt;BR /&gt;which is the same as those 8 lines I wrote converted from your code&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Sat, 09 Apr 2005 12:13:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-df-k-on-perl/m-p/3517857#M701249</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-04-09T12:13:14Z</dc:date>
    </item>
  </channel>
</rss>

