Odd word problem: Difference between revisions
Content added Content deleted
(→{{header|Perl}}: added threads version) |
(→{{header|Perl}}: comment edit) |
||
Line 760: | Line 760: | ||
=={{header|Perl}}== |
=={{header|Perl}}== |
||
All versions process text until EOF, not dot. |
|||
Input: |
Input: |
||
Line 816: | Line 816: | ||
}</lang> |
}</lang> |
||
===Threads (processes) version=== |
===Threads (processes) version=== |
||
Perl still has weak threads support. |
Perl still has weak threads support. Far more safe yet portable is to use processes (fork). |
||
Here, fork is used instead of threads and pipe is used instead of conditional variable. |
Here, fork is used instead of threads and pipe is used instead of conditional variable. |