#! perl -slw use strict; sub mysplit (\@;@) { local $" = "|"; #" split "@{+shift}" => @_; } my @array = (':','::','\s+'); my $string = "a:b::c d"; my @chunks = mysplit @array => $string; print @chunks; __END__ C:\test>218759.pl 1