I use this globale for clean Title
sub { my @loop; foreach (split /\n/, $_[0]) { s/[)(-\+!:@#%^&_|"\><}{\]?\[,\/\.]//g; my $hash; $hash->{Title} = $_; $hash->{CleanTitle} = $_; $hash->{CleanTitle} =~ s/\s+/-/g; $hash->{CleanTitle} =~ s/\-+/-/g; push @loop, $hash; } return { format_page_loop => \@loop }; }
I have small problem with Title that when I have somting like this aaa/bbb
who can I get aaa-bbb now it delete the / and create aaabbb
sub { my @loop; foreach (split /\n/, $_[0]) { s/[)(-\+!:@#%^&_|"\><}{\]?\[,\/\.]//g; my $hash; $hash->{Title} = $_; $hash->{CleanTitle} = $_; $hash->{CleanTitle} =~ s/\s+/-/g; $hash->{CleanTitle} =~ s/\-+/-/g; push @loop, $hash; } return { format_page_loop => \@loop }; }
I have small problem with Title that when I have somting like this aaa/bbb
who can I get aaa-bbb now it delete the / and create aaabbb