Help for this page

Select Code to Download


  1. or download this
    % perl kwic.pl a an the
    an ostrich
    ...
    the an BIRD
    an OSTRICH
    %
    
  2. or download this
    $i{$x}=1while$x=pop;s/\w+/$i{$&}or$k{$&}.="$`\U$&\E$'"/egwhile<>;print
    +@k{sort keys%k}
    
  3. or download this
    p={}
    i={}
    ARGV.each{|x|i[x]=1}.clear
    while l=gets;l.gsub(/\S+/){|s|p[s]=''if !p[s];p[s]<<$`+$&.upcase+$'if 
    +!i[s]}end
    p.sort.each{|x,y|print y}