in reply to split and sort functions
Update:use strict; use warnings; my $str='1,zxc,2,asd,3,qwe'; foreach ( $str =~ /([^,]+,[^,]+)/g ) { my ($k, $v) = split /,/; print "Do something with key $k and value $v\n"; }
foreach (my ($k,$v) = $str =~ /([^,]+),([^,]+)/g) {
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: split and sort functions
by zkeeper (Initiate) on Apr 21, 2006 at 21:47 UTC |