in reply to Re^4: Undefined Error
in thread Undefined Error

/^BIND$/ matches if that is the only word on the line.

Try adding word boundaries \b like this ;

while (<DATA>){ if (/\bBIND\b/){ print $_; } } __DATA__ this is a BIND sentence I have UNBIND in this one BIND as first word last word is BIND

poj