--- EPrints/EPrints.pm 2007/06/29 09:21:11 3 +++ EPrints/EPrints.pm 2007/06/29 09:52:53 4 @@ -3,7 +3,7 @@ package EPrints; use Exporter 'import'; -@EXPORT_OK = qw(_x); +@EXPORT_OK = qw(_x slogovi); use Encode qw/from_to decode_utf8 decode/; use Data::Dump qw/dump/; @@ -58,4 +58,18 @@ return "$v "; } +sub slogovi { + my $text = shift; + my @s; + foreach my $w ( split(/\W*\s+\W*/, $text ) ) { + my $pos = 0; + while ( $w =~ s/^([^aeiou]*[aeiou])//i ) { + push @s, $pos++ . $1; + } + push @s, $pos . $w if $w; + warn "slogovi = ", dump( @s ), $/ if $debug; + } + return @s; +} + 1;