<?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 HOST in perl in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/host-in-perl/m-p/4156693#M90689</link>
    <description>thanks to H Merijn Brand for his answer to&lt;BR /&gt;the thread&lt;BR /&gt;displaying hostname on xterm window titlebar&lt;BR /&gt;June 6 2005&lt;BR /&gt;&lt;BR /&gt;tinyurl is not allowed :(&lt;BR /&gt;&lt;BR /&gt;Here is the code I put in .kshrc&lt;BR /&gt;HOST=$HOST; export HOST&lt;BR /&gt;perl -le'print "\e]0;$ENV{HOST}\7"'&lt;BR /&gt;&lt;BR /&gt;from perl I printed out %ENV but HOST was not there so I added the HOST=$HOST line above it&lt;BR /&gt;&lt;BR /&gt;why do I need to explicity set HOST on HP-UX?&lt;BR /&gt;</description>
    <pubDate>Thu, 06 Mar 2008 17:02:14 GMT</pubDate>
    <dc:creator>Peter Brimacombe</dc:creator>
    <dc:date>2008-03-06T17:02:14Z</dc:date>
    <item>
      <title>HOST in perl</title>
      <link>https://community.hpe.com/t5/operating-system-linux/host-in-perl/m-p/4156693#M90689</link>
      <description>thanks to H Merijn Brand for his answer to&lt;BR /&gt;the thread&lt;BR /&gt;displaying hostname on xterm window titlebar&lt;BR /&gt;June 6 2005&lt;BR /&gt;&lt;BR /&gt;tinyurl is not allowed :(&lt;BR /&gt;&lt;BR /&gt;Here is the code I put in .kshrc&lt;BR /&gt;HOST=$HOST; export HOST&lt;BR /&gt;perl -le'print "\e]0;$ENV{HOST}\7"'&lt;BR /&gt;&lt;BR /&gt;from perl I printed out %ENV but HOST was not there so I added the HOST=$HOST line above it&lt;BR /&gt;&lt;BR /&gt;why do I need to explicity set HOST on HP-UX?&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Mar 2008 17:02:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/host-in-perl/m-p/4156693#M90689</guid>
      <dc:creator>Peter Brimacombe</dc:creator>
      <dc:date>2008-03-06T17:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: HOST in perl</title>
      <link>https://community.hpe.com/t5/operating-system-linux/host-in-perl/m-p/4156694#M90690</link>
      <description>Hi Peter:&lt;BR /&gt;&lt;BR /&gt;You are declaring and exporting the variable (and its value) called "HOST" to the running environment.  THen, and only then, does Perl find it.&lt;BR /&gt;&lt;BR /&gt;I would expect that the declaration and export might look like:&lt;BR /&gt;&lt;BR /&gt;# HOST=$(hostname); export HOST&lt;BR /&gt;&lt;BR /&gt;...or:&lt;BR /&gt;&lt;BR /&gt;# HOST=servername; export HOST&lt;BR /&gt;&lt;BR /&gt;If you want to see all the variables and their values in your environment, do:&lt;BR /&gt;&lt;BR /&gt;perl -le 'for $key (keys %ENV) {print "$key =&amp;gt; $ENV{$key}"}'&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 06 Mar 2008 17:26:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/host-in-perl/m-p/4156694#M90690</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-03-06T17:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: HOST in perl</title>
      <link>https://community.hpe.com/t5/operating-system-linux/host-in-perl/m-p/4156695#M90691</link>
      <description>&amp;gt; HOST=$HOST; export HOST&lt;BR /&gt;&lt;BR /&gt;Here you assign the value of $HOST to $HOST, which is a no-op&lt;BR /&gt;&lt;BR /&gt;if $HOST is not set in your shell (I use the tcsh), you better do it like&lt;BR /&gt;&lt;BR /&gt;export HOST=`hostname`&lt;BR /&gt;or&lt;BR /&gt;export HOST=$(hostname)&lt;BR /&gt;&lt;BR /&gt;or something similar, there are so many ways to do that&lt;BR /&gt;&lt;BR /&gt;&amp;gt; perl -le'print "\e]0;$ENV{HOST}\7"'&lt;BR /&gt;&lt;BR /&gt;maybe you have another variable that reflects your hostname?&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Thu, 06 Mar 2008 17:42:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/host-in-perl/m-p/4156695#M90691</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2008-03-06T17:42:44Z</dc:date>
    </item>
  </channel>
</rss>

