Re: hex-array print
- From: Joe Smith <joe@xxxxxxxxx>
- Date: Fri, 30 Sep 2005 03:57:32 -0700
joe.cipale@xxxxxxxxxxx wrote:
I am using perl to write a acript that will retreive SNMP data and possibly modify SNMP values for a given object on a switch.
If I retreive the SNMP data using the standard Net-SNMP command (snmpget), the data I see is:Hex-STRING:FF FF FF F0 00 00 00
If, on the other hand, I use the SNMP package written in perl, the data is returned as such: yyy0.
I think you mean ÿÿÿð.
I have tried to have the data stored as an array (@hex_data) and attempted to access the data by walking through it one character at a time with no luck
pack() and unpack() were created for just such.
perl -le '$_="\xff\xff\xff\xf0"; print "$_ = ",unpack "H*",$_' ÿÿÿð = fffffff0
-Joe .
- References:
- hex-array print
- From: joe.cipale@xxxxxxxxxxx
- hex-array print
- Prev by Date: Re: Full_screen by default after loan the CGI file, anyone know
- Next by Date: Re: Perl calculate and average problem
- Previous by thread: Re: hex-array print
- Next by thread: I have problems with download scripts, it's trying to print instead of saving the file
- Index(es):
Relevant Pages
|
|