words

#!/usr/bin/perl

# Get the wordcount output
open (WC, "wc ../TXTs/* |");

# Move to the last line of output, and catch no. of words data
while (<WC>) {($number)=$_=~/\w+\s+(\w+)/;}

# Output some relevant HTML
print "
<HTML><BODY>
<CODE><H3><FONT size=\"-2\" color=\"#123456\">
<BR>$number words
</FONT><H3></CODE></HTML></BODY>\n";