note
monktim
<code>
use strict;
use warnings;
my @listOfPass;
my ($section,%passwds);
while(<DATA>) {
chomp;
if (/^\[(.*?)\]$/) {
$section = $1;
next;
} elsif ($section eq 'PASSWORDS') {
my ($mkt,$pass) = split;
push @listOfPass, $pass;
}
}#end while loop
print join(',', @listOfPass);
__DATA__
[PASSWORDS]
GUY ddd
GIRL dfd33
BOY df341</code>
<b>UPDATE</b> I just reread the OP. The passwords need to be in the order that they were received. I modified this code to use the <b>push</b> function like [Ovid] suggested. I got too trigger happy with my caffeine induced post :)
324765
324765