Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Allowed VLANs with SNMP

by spivey49 (Monk)
on Oct 23, 2008 at 19:17 UTC ( #719130=note: print w/replies, xml ) Need Help??


in reply to Re: Allowed VLANs with SNMP
in thread Allowed VLANs with SNMP

Thanks, I think that's exactly what I need.

my $h = "ff00f0fe"; # just 32 bits here, but any other length possibl +e $h =~ s/0x//g; my $b = unpack("B*", pack("H*", $h)); print "$b\n"; # 11111111000000001111000011111110 foreach $idx (1..1023){ my $allowed = substr($b, $idx-1, 1) eq "1"; if ($allowed){print "$idx is allowed\n";} else{print "$idx is not allowed\n";} }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://719130]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2019-12-07 13:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (161 votes). Check out past polls.

    Notices?