Hi,<br><br>I have the following scenario where I need to extract node name information based on certain conditions from an application, and write the data out to a file and HUP the process concerned.  I have managed to get to a certain point however need some advise.<br>

<br>Script output:<br><br>#!/usr/bin/perl<br>use strict;<br>use warnings;<br><br>## Cut down version of regex list<br><br>my @critical_device_def = (<br>    [AAA    =&gt; qr{...apb09}    ],<br>    [BBB    =&gt; qr{...avggd09}    ],<br>
    [CCC =&gt; qr{...uytwop09}    ],<br>    [DDD =&gt; qr{...loupoi09}   ]<br><br>);  <br><br>my @DEVICE_LIST;<br>my $file = &quot;rules.txt&quot;;<br>my @tokens;<br><br>open(UPDATE, &quot;&gt;$file&quot;) || die &quot;Can&#39;t open new file: $!\n&quot;;<br>
<br>@DEVICE_LIST=`/opt/OV/bin/ovtopodump | awk &#39;\$3 ~ /^[a-z]+.*\.my\.domain\.com\.au/{print \$3}&#39;| uniq`;<br><br>foreach (@DEVICE_LIST)<br>  { <br>    for my $t (@critical_device_def)<br>    {<br>      my ($site, $device, $flag) = @$t;<br>
      if ($_ =~ m/\G($device)/gc) <br>      {<br>        <br>        print UPDATE &quot;$_&quot; ;<br>        next;<br>      }<br>        <br>    }<br>        <br>  }<br><br>=====<br><br>The problem I am having is that at the print UPDATE line, I need to append to the data a tab and the number 1.  With the current code, the file output looks like this:<br>
<br><a href="http://cpploupoi09.my.domain.com.au">cpploupoi09.my.domain.com.au</a><br><a href="http://cpqavggd09.my.domain.com.au">cpqavggd09.my.domain.com.au</a><br><br>however, I need the contents to be printed to the file in the format below where the hostname then a tab and the number one is printed:<br>
<br><a href="http://cpploupoi09.my.domain.com.au">cpploupoi09.my.domain.com.au</a> &lt;tab_space&gt; 1<br>
<a href="http://cpqavggd09.my.domain.com.au">cpqavggd09.my.domain.com.au</a> &lt;tab_space&gt; 1<br><br>What is the best way to do this?<br><br>Also what is the best way to send a HUP signal to a running Unix process?<br>
<br>Appreciate your help.<br><br>