Re: Bit reversal of MAC Address bytes...

2002-03-20 Thread Tom VanCourt
At 09:50 AM 3/19/2002 -0500, Tim Musson wrote: >Thanks to all who sent pointers! > >Here is my code before I put it up as a web page tool (and clean it up >and comment it ). > >comments/suggestions anyone? > >#!perl -w >use strict; >use diagnostics; > >my $debug = "yes"; >my (@mac); >my $mac = "01

Re: Bit reversal of MAC Address bytes...

2002-03-19 Thread Tim Musson
Thanks to all who sent pointers! Here is my code before I put it up as a web page tool (and clean it up and comment it ). comments/suggestions anyone? #!perl -w use strict; use diagnostics; my $debug = "yes"; my (@mac); my $mac = "0123 6789 cdef"; $mac =~ s/\s//g; my $i = 0; while($mac =~ /(.{

Re: Bit reversal of MAC Address bytes...

2002-03-19 Thread Tim Musson
Hey David, My MUA believes you used Microsoft Outlook, Build 10.0.2627 to write the following on Monday, March 18, 2002 at 4:22:02 PM. >> 1. How do I brake the MAC Address up into bytes? DG> I'm not exactly sure what format you're getting the MAC address in, but DG> it looks like you're just s

RE: Bit reversal of MAC Address bytes...

2002-03-18 Thread Timothy Johnson
Check out pack() and unpack() for converting the values. -Original Message- From: Tim Musson [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 12:15 PM To: [EMAIL PROTECTED] Subject: Bit reversal of MAC Address bytes... hey perl guru's, I have need to do a bit reversal of a MA

RE: Bit reversal of MAC Address bytes...

2002-03-18 Thread David Gray
> 1. How do I brake the MAC Address up into bytes? I'm not exactly sure what format you're getting the MAC address in, but it looks like you're just splitting it into two-character chunks... To split that, you could do: my $c = 0; while($mac =~ /(.{2})/g){ $mac[$c++] = $1; } > 2. How to c