#!/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:
Regards,yyy :54321 xxx :12345 zzz :13245
In reply to Re: split question
by helgi
in thread split question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |