Note: The archives category content is an automatically generated focus channel and does not neccessarily reflect the opinions of this blog. No responsibility is taken for the external links presented here, follow at your own discretion.
The archives content is never scraped from sites - but an abstract obtained from search engines.
| Problem |
Solution |
Example |
Reference |
Recommended |
while(<>) { push @words, split; } print "found ".scalar(@words)." words in file\n"; Works nicely, even over multiple lines: [marcus@bree]/var/log/httpd% echo "test 1 23 4 \n a b c" | perl -e 'while() { chomp(); push @words, split; } print "found ".scalar(@words)." words in file\n"; ' found 7 words in file
|
Leave a Reply