#!/usr/bin/perl use strict; use warnings; use Tie::IxHash; my $sep = '<;>'; my $string = 'a<;>eine<;>an<;>eine<;>one<;>eine<;>to have a smoke<;>eine rauchen [ugs.]<;>'; tie my %hash, 'Tie::IxHash'; %hash = split /$sep/, $string; while ( my ($key,$val) = each %hash ){ print $key, " :: ", $val,"\n"; }