Ah...I find that you delete the code
#sudo($airmon, "start", $interface);
Does it means that I need to enable monitor mode on wlan1 before that ? In this way, wlan1 will be wlan1mon, so why define interface as wlan1 but not wlan1mon?
Your reply will be appreciated!!