- or download this
my @searchTexts = split (/and|or/i,$query);
foreach my $text (@searchtexts) {
...
$text =~ s/\s+$//;
print "$text\n";
}
- or download this
foreach (split /and|or/i,$query) {
s/^\s*(.*?)\s*$/$1/;
print "$_\n";
}
- or download this
print join("\n",map {/^\s*(.*?)\s*$/;$1} split(/and|or/i,$query)) . "\
+n";
- or download this
print join("n\",split(/\s*(?:and|or)\s*/,$query)) . "\n";
- or download this
$query =~ s/\s*(?:and|or)\s*/\n/g;
print "$query\n";