$ perl -e 'print "\0foo"'|grep foo Binary file (standard input) matches