#!/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";
In reply to Counting links in a file? by DigitalKitty
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |