##
#! /usr/bin/perl -w
use strict;
my $string = "FOO=1\nFOO=2\nFOO=3\n";
my @list;
while ($string =~ /^FOO=(\d)/mg) {
push (@list,$1);
}
print join(",",@list)."\n";
# prints out 1,2,3
####
my $dollars = 0;
my $pounds = 0;
while() {
if (/>(\d+\.\d{2})<) {
# no dollar sign, must be pounds
$pounds = $1
} elsif (/>\$(\d+\.\d{2}) {
# it's got a dollar sign, must be a dollar
$dollars = $1;
}
}