If the username is always different (which it probably would be), then something like this should get you started:
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
my %userinfo;
while ( <DATA> ) {
chomp;
my ( $username, $realname, $password ) = split /\|/;
$userinfo{$username} = { realname => $realname, password => $passw
+ord };
}
print Dumper \%userinfo;
__DATA__
patgas|patrick|foobar
doodle|what|now
cannot|think|of
better|sample|data
Update: forgot to
chomp!
"We're experiencing some Godzilla-related turbulence..."