well, the conventional wisdom is use a module to parse HTML and I was tempted to make that comment first time around. However the regex seemed sufficiently trivial that it didn't seem really to matter. Using something like HTML::TreeBuilder would sure make it easier to dig the data out for a lot of modems though - mine (which uses a table) for a start!
If you are going to use /x then take advantage of it and use some white space to break up the different components of the regex so they are easier to parse by eye. Consider:
$content =~ m{ Frequency(\d+\s Hz)\s Signal \s To \s Noise \s Ratio([\d.]+ \s dB)\s Power \s Level([\d.-]+ \s dBmV) }xi or My_Die('content failed!');
In reply to Re^3: Cable modem status
by GrandFather
in thread Cable modem status
by ruzam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |