#!/usr/local/bin/perl -w use strict; use warnings; my $tmpl = < --DESCR-- 60 7 365 1 public --OID-- 161 EOF while(<>) { die "Bad strings '$_'\n" unless /^.*([^.]\.\d)\t([\d.]+)\t([^\t]+)\t?([\d]*); my %hash = ('descr' => $1, 'oid' => $2, 'type' => $4); $s =~ s/--DESCR--/$hash{$1}/g; $s =~ s/--OID--/$hash{$2}/g; $s =~ s/--TYPE--/$hash{$3}/g; print $s, "\n"; }