On Sep 23, 9:42 pm, soorajspadmanab...@gmail.com (Sooraj S) wrote:
> p2
> ===
> use Net::Telnet;
>
> $t = new Net::Telnet();
> $t->open("machine");
> $t->login("user","paswd");
> $t->cmd("p3 $flag");
> $t->close();
Since you are using the Net::Telnet Module.. it would have been better
if you used
> while(){
Use of a File Handle in this case would be better
> my ($key, $value) = split (/\t/,$_);
and Use "\s+" instead of "\t" .
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On Apr 30, 9:30 pm, jcas...@activenetwerx.com ("Joseph L. Casale")
wrote:
> Is it required to manually close a file handle I used
> to write debugging info to when the Perl scripts exits?
>
> Seems like a waste of effort at the end of the script to
> test `if debug...` and close the fh after?
>
> T