in reply to split question

Here's one way to accomplish this, relying on the fact that assigning an array to a hash breaks it down into key, value pairs:

#!/usr/bin/perl -w use strict; my $var = "xxx:12345 yyy:54321 zzz:13245"; my %value; %value = split /[:\ ]/,$var; for (keys %value) { print "$_\t:$value{$_}\n"; }

This results in the following output:

yyy :54321 xxx :12345 zzz :13245
Regards,
Helgi Briem