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.";
In reply to Re: Re: split question
by sauoq
in thread split question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |