NetSnake wrote: > Hi,all: > I use Perl SNMP module to get server information, but I can not > print ethernet MAC address. > When I use snmpwalk or snmpget program, I get like this: > ifPhysAddress.2 = STRING: 0:e0:ac:b0:c2:1 . > But in Perl, I can not print this string, in consol, perl print > 0 Use hex function along a line like this: use strict; use warnings;
$_= '0:e0:ac:b0:c2:1'; my @MyData = (); @MyData = split(/:/, $_); foreach ( @MyData ) { printf "%d:", hex($_); } print "\n"; Output: 0:224:172:176:194:1: A start. Wags ;) > In web, perl print some strange char. > So, how to print this information? > Thanks a lot. > > > Best Regards. Any questions and/or problems, please let me know. Thanks. Wags ;) Int: 9-8-002-2224 Ext: 408-323-4225x2224 ********************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. **************************************************************** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>