gitarwmn has asked for the wisdom of the Perl Monks concerning the following question:
main2(); sub main2{ print "Type first sentance: "; chomp (my $sentence = lc<STDIN>); print "\n"; my @words = split(" ", $sentence); print "Type second line: "; chomp (my $sentence2 = lc<STDIN>); print "\n"; my @words2 = split(" ", $sentence2); print "Type third line: "; chomp (my $sentence3 = lc<STDIN>); print "\n"; my @words3 = split(" ", $sentence3); my @string = join (" ",@words,@words2,@words3); print @string; my @sortedwords = sort @string; print "\n@sortedwords\n"; }
Janitored by davido: Added code tags, and moved from PerlMonks Discussion to Seekers of Perl Wisdom. Please use code tags, please post questions to Seekers of Perl Wisdom section.
janitored by ybiC: Retitle from "sort" because onewordnodetitles hinder site search
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sorting doesn't seem to work
by dragonchild (Archbishop) on Oct 07, 2004 at 17:41 UTC | |
|
Re: Sorting doesn't seem to work
by shemp (Deacon) on Oct 07, 2004 at 18:16 UTC | |
|
Re: Sorting doesn't seem to work
by gitarwmn (Beadle) on Oct 07, 2004 at 18:16 UTC | |
|
Re: Sorting doesn't seem to work
by gitarwmn (Beadle) on Oct 07, 2004 at 18:22 UTC |