Jump to content
Fórum Script Brasil
  • 0

Perl - Básico


João Paulo Dias

Question

Pessoal, fiz o seguinte programa:

#!/usr/local/bin/perl

#filename: /opt/local/perl_scripts/snmpget.pl

use SNMP_util;

$MIB1 = shift;

$HOST = shift;

($MIB1)&&($HOST)|| die "Usage: $0 MIB_OID HOSTNAME";

print "$HOST";

($value) = &snmpget("joao\@$HOST","$MIB1");

if ($value) { print "Results :$MIB1: :$value:\n"; }

else { warn "No response from host :$HOST:\n"; }

Está me aparecendo o erro abaixo. Como sou novo na linguagem, peguei um código , mas não entendo essa inserção do Shift na variável $Host.

Alguém poderia me ajudar? :unsure:

Error:

can't resolve "joao@" to IP address

at C:/Perl/site/lib/SNMP_util.pm line 426

SNMPGET Problem for joao@

at C:\Documents and Settings\JoÒo Paulo\Desktop\perl\snmpget2.pl line 7

No response from host ::

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
erro:

não pode resolver "Joao@" para o endereço IP

em C :/ Perl / site / lib / SNMP_util.pm linha 426

Problema snmpget para Joao@

em C: \ Documents and Settings \ JoÒo Paulo \ Desktop \ perl \ snmpget2.pl linha 7

Sem resposta do anfitrião ::

veja

http://docstore.mik.ua/orelly/networking_2...nmp/ch08_01.htm

OBS: Se tiver dificuldade com o ingles, use o tratudor do google

abraço

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...