in reply to Looking for NULLS in a string

while (<INFILE>) { local $" = ', '; my @positions; push @positions, pos() while /\000/g; print 'Found nulls at line ', $. , ', positions ' "@positions.$/" if @positions; }

$. is the line number maintained by the diamond operator. $" is the record seperator for stringified arrays. pos() is the last match position maintained by the regex engine.

After Compline,
Zaxo