new files
This commit is contained in:
parent
3af7344581
commit
86c034bb8b
1364 changed files with 21352 additions and 0 deletions
12
Task/Ordered-words/Perl/ordered-words.pl
Normal file
12
Task/Ordered-words/Perl/ordered-words.pl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/perl
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
open(FH, "<", "unixdict.txt") or die "Can't open file!\n";
|
||||
my @words;
|
||||
while (<FH>) {
|
||||
chomp;
|
||||
push @{$words[length]}, $_ if $_ eq join("", sort split(//));
|
||||
}
|
||||
close FH;
|
||||
print "@{$words[-1]}\n";
|
||||
Loading…
Add table
Add a link
Reference in a new issue