Talk:Perl
Jump to navigation
Jump to search
WTF?
heiko@foobar:~$ perl -wlne'END{print$n}eof&&$n++;/<title>([^<]+)/i&&$n--' * Use of uninitialized value in print at -e line 1.
it prints the number of nonempty regular files in the directory. it will fail with the above in an empty directory or a directory with only 0 length files
It prints the number of files that don't contain an <title> Tag. Execution in a folder containing no files will result in this error --80.153.14.141