in reply to if not defined

not defined is absolutely valid Perl. Just be careful about precedence . Note that ! and not both mean not, but have varying precedence. So if you're going to use the not form, you should probably also use the and form of the AND operator, as && has a higher precedence than not, but and has a lower precedence, which is likely causing you trouble in your example. When in doubt, use parenthesis.

If you find this confusing, consider reading this Perl Journal article on the topic by Domimus, which covers the topic nicely.

perl -e 'split//,q{john hurl, pest caretaker}and(map{print @_[$_]}(joi +n(q{},map{sprintf(qq{%010u},$_)}(2**2*307*4993,5*101*641*5261,7*59*79 +*36997,13*17*71*45131,3**2*67*89*167*181))=~/\d{2}/g));'