http://www.perlmonks.org?node_id=1008713


in reply to if statement question

If $search has a true value, the code block inside the curlies will be executed. If not, the code inside the curlies won't be executed.

Tip #2 from the Basic debugging checklist: display the contents of variables using print:

print ">>>$search<<<"; if ($search) { }