in reply to Storing Text file in hash
Update: forgot to chomp!#!/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
"We're experiencing some Godzilla-related turbulence..."
|
|---|