<code>
open FILE, "dir/filename.ext";
while (!eof(FILE)) {
$file = <FILE>;
@pairs = split(/&/, $file);
foreach $pair (@pairs) {
($user, $pass, $bgcolor, $fgcolor) = split(/:/, $pair);
$passwords{$fuser} = $fpass;
$bgcolors{$fuser} = $fbgcolor;
$fgcolors{$fuser} = $ffgcolor;
$usernames{$fuser} = $fuser;
}
}
<code>
Now how can I sort through these alphabetically and print them to the screen?
Thanks ahead of time. :-)
In reply to Alphabetically sorting hashes by mt2k
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |