Help for this page

Select Code to Download


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