Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Trying to get a count of how many times this page has a reg expression
match on abcdef. The attempt below keeps giving me a result of
1 hit. Please advise how I can correct this?
use strict; my $url = 'ftp://ftp.thesite.com/directory/'; my $content = get($url); my @files; push(@files,$content); for(@files) { if( $_ =~ /(abcdef)/ ) { print "$1\n"; print (scalar(@files)); } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Hits on a reg expression
by shenme (Priest) on Sep 15, 2003 at 20:29 UTC | |
Re: Hits on a reg expression
by Mr. Muskrat (Canon) on Sep 15, 2003 at 20:30 UTC | |
by Anonymous Monk on Sep 16, 2003 at 10:38 UTC | |
Re: Hits on a reg expression
by Abigail-II (Bishop) on Sep 15, 2003 at 21:22 UTC | |
Re: Hits on a reg expression
by Grygonos (Chaplain) on Sep 15, 2003 at 20:13 UTC | |
Re: Hits on a reg expression
by asarih (Hermit) on Sep 15, 2003 at 20:31 UTC |
Back to
Seekers of Perl Wisdom