my %hash; open FH, "<", "/path/to/file" or die "Can't open file: $!"; while(<FH>) { chomp; if($_ =~ m/^([^:]+): (.*)$/) { $hash{$1} = $2; } } close FH;
In reply to Re: read the file and assign each line to a hash????
by b10m
in thread read the file and assign each line to a hash????
by sam_0056
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |