in reply to I don't understand why I'm getting an unitialized value warning
Here I'm assuming chromatic's assessment of the code is
correct (that \n\n is the record delimiter). This isn't
particularly useful, but I like ugly one-liners:)
perl -an0777 -F"\n\n" -e 'END { print "There are ", scalar @F, " recor +ds in $ARGV\n" }' foo.txt
|
---|
In Section
Seekers of Perl Wisdom