<?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: How to make Telnet Perl Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959155#M814908</link>
    <description>Hi Ralph,&lt;BR /&gt;&lt;BR /&gt;Will the Mime::Lite replace this code for sending mail?&lt;BR /&gt;&lt;BR /&gt;# Send Mail&lt;BR /&gt;$sendmail = "/usr/lib/sendmail -t";&lt;BR /&gt;$to = "To: abc@123.com\n";&lt;BR /&gt;$from = "From: 123@abc.com\n";&lt;BR /&gt;#$reply_to = "Reply-To: 123@abc.com\n";&lt;BR /&gt;$subject = "Subject: Mail\n";&lt;BR /&gt;$content = "\n";&lt;BR /&gt;&lt;BR /&gt;open(SENDMAIL, "|$sendmail") or die "Cannot opem $sendmail: $!";&lt;BR /&gt;print SENDMAIL $to;&lt;BR /&gt;print SENDMAIL $from;&lt;BR /&gt;#print SENDMAIL $reply_to;&lt;BR /&gt;print SENDMAIL $subject;&lt;BR /&gt;print SENDMAIL "Content-type: text/plain\n\n";&lt;BR /&gt;print SENDMAIL $content;&lt;BR /&gt;close(SENDMAIL);&lt;BR /&gt;</description>
    <pubDate>Tue, 29 Apr 2003 07:23:52 GMT</pubDate>
    <dc:creator>Jonathan_63</dc:creator>
    <dc:date>2003-04-29T07:23:52Z</dc:date>
    <item>
      <title>How to make Telnet Perl Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959149#M814902</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I need a perl script that will telnet to a router/switch specified by hpov alert.  Then it will issue `show proc cpu` and save the result in a text file.&lt;BR /&gt;&lt;BR /&gt;Help will be greatly aprreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;jonathan</description>
      <pubDate>Fri, 25 Apr 2003 01:15:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959149#M814902</guid>
      <dc:creator>jon_90</dc:creator>
      <dc:date>2003-04-25T01:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Telnet Perl Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959150#M814903</link>
      <description>hi jon,&lt;BR /&gt;&lt;BR /&gt;you can use the Net::Telnet::Cisco package for this purpose. access this site &lt;A href="http://nettelnetcisco.sourceforge.net/docs.html" target="_blank"&gt;http://nettelnetcisco.sourceforge.net/docs.html&lt;/A&gt; to find any reference for Cisco router. attached below is a sample perl script. You can modify this to your needs.&lt;BR /&gt;&lt;BR /&gt;thanks,&lt;BR /&gt;Rodel</description>
      <pubDate>Fri, 25 Apr 2003 02:10:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959150#M814903</guid>
      <dc:creator>Rodel D. Bautista</dc:creator>
      <dc:date>2003-04-25T02:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Telnet Perl Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959151#M814904</link>
      <description>hi&lt;BR /&gt;not sure of perl script. but an easy solution is to use expect.&lt;BR /&gt;&lt;BR /&gt;expect is used to automate interactive commands. &lt;BR /&gt;&lt;BR /&gt;check out the below link for more details.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Tcl/expect-5.38/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Tcl/expect-5.38/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;cheers&lt;BR /&gt;-balaji</description>
      <pubDate>Fri, 25 Apr 2003 02:32:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959151#M814904</guid>
      <dc:creator>Balaji N</dc:creator>
      <dc:date>2003-04-25T02:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Telnet Perl Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959152#M814905</link>
      <description>Hi Rodel,&lt;BR /&gt;&lt;BR /&gt;Thanks for the script.  I have it running already.  &lt;BR /&gt;&lt;BR /&gt;Now i want to attach the result file to a sendmail. How would i do it? i have a script using sendmail working,  just need the code for attaching a file.&lt;BR /&gt;&lt;BR /&gt;thanks.&lt;BR /&gt;jonathan</description>
      <pubDate>Tue, 29 Apr 2003 05:41:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959152#M814905</guid>
      <dc:creator>Jonathan_63</dc:creator>
      <dc:date>2003-04-29T05:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Telnet Perl Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959153#M814906</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;One simple way, will be to include the file into the body itself.&lt;BR /&gt;========================================================&lt;BR /&gt;dt=`date +%y%m%d-%H%M`    &lt;BR /&gt;errorlogfile="$LOGPATH/mylog$dt.log"&lt;BR /&gt;emailadd1="yd@myworld.mu"&lt;BR /&gt;subject="My logfile"&lt;BR /&gt;&lt;BR /&gt;/usr/bin/mailx -s "$subject" $emailadd1 &amp;lt; $errorlogfile &lt;BR /&gt;========================================================&lt;BR /&gt;&lt;BR /&gt;If you want it as an attachement, try:&lt;BR /&gt;/usr/bin/uuencode $errorlogfile "TheLogfile.log"|mailx -m -s "This is the file you need [subject] on `date`" $emailadd1 &lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Tue, 29 Apr 2003 05:58:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959153#M814906</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2003-04-29T05:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Telnet Perl Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959154#M814907</link>
      <description>Jonathan,&lt;BR /&gt;&lt;BR /&gt;the easiest way to make a mail attachment is to use the MIME::Lite module from CPAN.&lt;BR /&gt;&lt;BR /&gt;Have a look here for a short sample, or better consult your already installed POD on your system&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.perldoc.com/perl5.8.0/pod/perlfaq9.html#How-do-I-use-MIME-to-make-an-attachment-to-a-mail-message-" target="_blank"&gt;http://www.perldoc.com/perl5.8.0/pod/perlfaq9.html#How-do-I-use-MIME-to-make-an-attachment-to-a-mail-message-&lt;/A&gt;</description>
      <pubDate>Tue, 29 Apr 2003 06:21:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959154#M814907</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2003-04-29T06:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Telnet Perl Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959155#M814908</link>
      <description>Hi Ralph,&lt;BR /&gt;&lt;BR /&gt;Will the Mime::Lite replace this code for sending mail?&lt;BR /&gt;&lt;BR /&gt;# Send Mail&lt;BR /&gt;$sendmail = "/usr/lib/sendmail -t";&lt;BR /&gt;$to = "To: abc@123.com\n";&lt;BR /&gt;$from = "From: 123@abc.com\n";&lt;BR /&gt;#$reply_to = "Reply-To: 123@abc.com\n";&lt;BR /&gt;$subject = "Subject: Mail\n";&lt;BR /&gt;$content = "\n";&lt;BR /&gt;&lt;BR /&gt;open(SENDMAIL, "|$sendmail") or die "Cannot opem $sendmail: $!";&lt;BR /&gt;print SENDMAIL $to;&lt;BR /&gt;print SENDMAIL $from;&lt;BR /&gt;#print SENDMAIL $reply_to;&lt;BR /&gt;print SENDMAIL $subject;&lt;BR /&gt;print SENDMAIL "Content-type: text/plain\n\n";&lt;BR /&gt;print SENDMAIL $content;&lt;BR /&gt;close(SENDMAIL);&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Apr 2003 07:23:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959155#M814908</guid>
      <dc:creator>Jonathan_63</dc:creator>
      <dc:date>2003-04-29T07:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Telnet Perl Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959156#M814909</link>
      <description>I don't know that much perl but I would use expect.&lt;BR /&gt;&lt;BR /&gt;i'm attaching an example script</description>
      <pubDate>Tue, 29 Apr 2003 10:42:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959156#M814909</guid>
      <dc:creator>John Meissner</dc:creator>
      <dc:date>2003-04-29T10:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Telnet Perl Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959157#M814910</link>
      <description>Not necessarily completely since you may combine your more "low level" invocation of your MTA with the module methods.&lt;BR /&gt;&lt;BR /&gt;But (as always with Perl) you have several options since a module like MIME::Lite or the MIME::Tools put an extra abstraction layer over the mail transfer, where you may specify your MTA or let the module take what it detcts as default (this makes your Perl code a bit OS and MTA independent, provided you've got the right set of modules installed).&lt;BR /&gt;&lt;BR /&gt;I'd suggest to get the MIME::Tools from CPAN&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.perl.com/CPAN/authors/Eryq/" target="_blank"&gt;http://www.perl.com/CPAN/authors/Eryq/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;In it's README you will find that they depend on a couple of other modules because they inherit from them which you also may have to install.&lt;BR /&gt;&lt;BR /&gt;As an attachment I uploaded the output from the POD of MIME::Tools that comes with exactly one example in its synopsis  that suits your piping to sendmail way.</description>
      <pubDate>Tue, 29 Apr 2003 11:18:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959157#M814910</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2003-04-29T11:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Telnet Perl Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959158#M814911</link>
      <description>hi jon,&lt;BR /&gt;&lt;BR /&gt;how about assigning us some points? I believe I have answered your main query for making a Telnet PERL script.&lt;BR /&gt;&lt;BR /&gt;regards.&lt;BR /&gt;&lt;BR /&gt;Rodel</description>
      <pubDate>Wed, 30 Apr 2003 05:47:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959158#M814911</guid>
      <dc:creator>Rodel D. Bautista</dc:creator>
      <dc:date>2003-04-30T05:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Telnet Perl Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959159#M814912</link>
      <description>Of course!  Can you show me how?  Sorry.</description>
      <pubDate>Wed, 30 Apr 2003 06:42:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959159#M814912</guid>
      <dc:creator>Jonathan_63</dc:creator>
      <dc:date>2003-04-30T06:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Telnet Perl Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959160#M814913</link>
      <description>hi jon,&lt;BR /&gt;&lt;BR /&gt;just click on the "how to earn points" link and you will find there the procedure to assign points.&lt;BR /&gt;&lt;BR /&gt;thanks.</description>
      <pubDate>Sun, 04 May 2003 23:16:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959160#M814913</guid>
      <dc:creator>Rodel D. Bautista</dc:creator>
      <dc:date>2003-05-04T23:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to make Telnet Perl Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959161#M814914</link>
      <description>To assign points, be sure you connect on with your original sign on of "jon". Your replies to this thread are from a different user.&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Mon, 05 May 2003 13:38:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-make-telnet-perl-script/m-p/2959161#M814914</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2003-05-05T13:38:11Z</dc:date>
    </item>
  </channel>
</rss>

