in reply to Re: split question
in thread split question
One way to do it with split:
#!/usr/bin/perl -w use strict; my $var = "xxx:12345 yyy:54321 zzz:13245"; my @items = split /:\S+\s*/, $var; print"@items\n"; __END__ xxx yyy zzz
-sauoq "My two cents aren't worth a dime.";
|
|---|