#!/usr/local/bin/perl -w use strict; my %data; while (<>) { next if /Header/; next if /Footer/; my($id, $name) = split ' ', $_; $data{$id} = $name; }