Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Rhys's scratchpad

by Rhys (Pilgrim)
on Sep 06, 2004 at 15:42 UTC ( #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
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2015-07-28 21:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (259 votes), past polls