in reply to Count Occurrences of a string
Not too difficult:
my $string = "AAACANANANTANAACATNNCAAAAAA"; my @matches = $string =~ /([AN]+)/g; $\=$,=$/; print @matches; __DATA__ output: AAA ANANAN ANAA A NN AAAAAA
As for everything else: opendir, readdir, closedir, glob, open, perlopentut, and of course the Schwartzian Transform.
Hope this helps.
antirice
The first rule of Perl club is - use Perl
The ith rule of Perl club is - follow rule i - 1 for i > 1
|
|---|