Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Rhys's scratchpad

by Rhys (Pilgrim)
on Sep 06, 2004 at 15:42 UTC ( [id://388824]=scratchpad: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
            }
            closedir(THISDIR);
    }
    
  2. or download this
    $mib = 'someMibObject';
    $vb = SNMP::Varbind->new([$mib]);
    ...
    if ( $sess->{ErrorNum} ) {
      # We might do something more interesting than print here.
    }
    
  3. or download this
    # Here are the ideas.  Remember that $mac = 'addr' is
    # supposed to be part of the 'given'.  My apologies if I
    ...
    #
    # Change '00:01:02:04:08:0A' to '0.1.2.4.8.10':
    $mac = '00:01:02:04:08:0A';
    
  4. or download this
    $mac =~ s/(..)(:)?/hex($1).($2?'.':'')/ge;
    
  5. or download this
    $mac =~ s/([0-9A-F]+|:)/$1 eq ':' ? '.' : hex($1)/ge;
    
  6. or download this
    $mac = join '.', map hex($_), split(/:/, $mac);
    
  7. or download this
                 Rate    Shenme PodMaster    My Way
    Shenme    38212/s        --      -31%      -50%
    PodMaster 55710/s       46%        --      -28%
    My Way    76982/s      101%       38%        --
    
  8. or download this
    # Convert any known MAC format to any other known format.
    sub ConvertMac($$$) {
    ...
        # anything else down here, we won't circumvent it by escaping earl
    +y.
        return($mac);
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-19 23:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found