Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

more elegant way to parse this?

by morgon (Priest)
on Feb 24, 2017 at 04:58 UTC ( [id://1182702]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    BSS <blah blah>
       SSID: <ssid>
       <blah blah>
    BSS <and so on>
    
  2. or download this
    my $out = qx| sudo iw dev wlan0 scan |;
    $out .= "\nBSS";
    ...
    my @chunks = $out =~ /^(BSS.*?)(?=^BSS)/smg;
    
    my @essids = map { /SSID: (.*?)$/ms; $1 } @chunks;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1182702]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-25 07:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found