Chris Knipe wrote:
Hi,

Hello,

I have two lines (well, 1 line is headers, then there follows a range of
data)...
# INTERFACE
RADIO-NAME       MAC-ADDRESS       AP  SIGNAL-STRENGTH TX-RATE UPTIME
 0 interface_name                                                  radio
00:0C:42:1F:2C:8D yes -63...@18mbps   9Mbps   2h2m38s

I'm looking for a foreach my $Line (@Output) {
  my ($interface, $radio, $mac, $ap, $signal, $txrate, uptime) =
split(/whatidontknow/, $Line, 7);
}

Can anyone perhaps help out with the what I don't know bit??   FYI - The
columns should be fixed lengths, if that helps perhaps...

If you are dealing with fixed length fields then you probably want to use unpack:

perldoc -f unpack
perldoc -f pack
perldoc perlpacktut



John
--
Those people who think they know everything are a great
annoyance to those of us who do.        -- Isaac Asimov

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to