in reply to Re^2: Find the shortest word in the English Language with: a b c d e f
in thread Find the shortest word in the English Language with: a b c d e f
Yes, and I can remove three additional chars by using bareword a and f rather than strings:
@ARGV="/usr/share/dict/words";while(<>){$a='a';$a++while/$a/i;push@{$_ +[length]},$_ if$a gt'f'}@_=map{$_?@$_:()}@_ @ARGV="/usr/share/dict/words";while(<>){$a=a;$a++while/$a/i;push@{$_[y +///c]},$_ if$a gt f}@_=map$_?@$_:(),@_
And who needs a path when perl can just guess? :P. @ARGV=</*/*/*/words>;while(<>){$a=a;$a++while/$a/i;push@{$_[y///c]},$_ if$a gt f}@_=map$_?@$_:(),@_ Which brings the count to 100 chars (including the \n)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Find the shortest word in the English Language with: a b c d e f
by mr_mischief (Monsignor) on Jul 06, 2018 at 18:02 UTC | |
by Eily (Monsignor) on Jul 07, 2018 at 07:52 UTC | |
by shmem (Chancellor) on Jul 10, 2018 at 16:58 UTC | |
by tybalt89 (Monsignor) on Jul 11, 2018 at 15:45 UTC | |
by usemodperl (Beadle) on Jul 11, 2018 at 17:30 UTC |