[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
On Mon, 2008-12-29 at 16:26 +0000, James Fidell wrote: > kevin wrote: > > Can any one see the syntax error in this perl script? > > > > #!/usr/bin/perl > > > > $word ="/usr/share/dict/words"; > > > > > > if ($word > > =~ /([^aeiou]*a[^aeiou]*e[^aeiou]*i[^aeiou]*o[^aeiou]*u[^aeiou]*)/) > > { print "$1\n"; } > > Syntax checks for me without a problem, though obviously the code isn't > going to work and the regex is insufficient :) > > > I have the last question of my Family xmas quiz as how many words with > > all the vowels in and in the order of a e i o u > > abstemious, arsenious and facetious are the only three, I believe. > > James > this now works perl -e 'print sort map { uc } grep /[^aeiou]*a[^aeiou]*e[^aeiou]*i[^aeiou]*o[^aeiou]*u/, <>' /usr/share/dict/words >> fileaeiou.txt and the output!! ABSTEMIOUS ABSTEMIOUSLY ABSTEMIOUSNESS ABSTENTIOUS ACHEILOUS ACHEIROUS ACLEISTOUS AFFECTIOUS ALEIKOUM ANEMIOUS ANNELIDOUS ARSENIOUS ARTERIOUS BACTERIOFLUORESCIN BACTERIOPURPURIN BACTERIOUS BEGGAR-MY-NEIGHBOUR CAESIOUS FACETIOUS FACETIOUSLY FACETIOUSNESS FRACEDINOUS HALF-SERIOUS HALF-SERIOUSLY LAPEIROUSIA MAJESTIOUS METARSENIOUS NONABSTEMIOUS NONABSTEMIOUSLY NONABSTEMIOUSNESS NONFACETIOUS NONFACETIOUSLY NONFACETIOUSNESS OVERABSTEMIOUS OVERABSTEMIOUSLY OVERABSTEMIOUSNESS PARECIOUS PARECIOUSLY PARECIOUSNESS PYROARSENIOUS SEXAGESIMO-QUARTO SULPHARSENIOUS SULPHOARSENIOUS THIOARSENIOUS TRAGEDIOUS UNABSTEMIOUS UNABSTEMIOUSLY UNABSTEMIOUSNESS UNABSTENTIOUS UNFACETIOUS UNFACETIOUSLY UNFACETIOUSNESS Regards Kevin Lucas Minions Post Master(Sub) reprieved (possibly!) Po House, Minions, Liskeard Cornwall PL14 5LE 01579363386 -- The Mailing List for the Devon & Cornwall LUG http://mailman.dclug.org.uk/listinfo/list FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html