http://www.perlmonks.org?node_id=396321

lisaw has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I'm looking for support regarding alphabetically sorting data with the following CGI code:
$editlist = $FORM{'list'}; open(FILE, "$datadir/$editlist\.txt") || &error_message("Can't find d +ata file - $datadir/$editlist\.txt."); @list = <FILE>; close(FILE); $numlist = @list; $ccc = 0; for ($a = 0; $a < $numlist; $a ++) { ($two, $one, $nochop) = split(/,/, $list[$a]); if ($one =~ /.*\@.*\..*/) { print "$two,$one\n"; $ccc++; } }
I sincerely appreciate any help that anyone can provide! Lis