while(){ chomp; print; print /^[^?]*<<\w+>>/ ? " - Match\n" : " - No Match\n"; } __DATA__ http://www.google.com/?stuff=<> http://<>.place.com/?blah=blahblah