Wlandetect is a very simple Perl script that checks which access points and
other peers can be reached and executes some commands based on what it has
found. It is very useful if you often switch between various wireless
environments.