DigitalKitty has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; @ARGV="test.html"; my $count = 0; while (<>) { foreach(/(http:|ftp:)\/\//g) { $count++; } } print "There are $count links in this file.\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Counting links in a file?
by Fletch (Bishop) on Mar 24, 2002 at 18:16 UTC | |
Re: Counting links in a file?
by Amoe (Friar) on Mar 24, 2002 at 19:47 UTC |