Reverse the order of lines in a text file while preserving the contents of each line: Difference between revisions
Content added Content deleted
(added Perl programming solution) |
m (→{{header|REXX}}: added wording to the REXX section header.) |
||
Line 89: | Line 89: | ||
=={{header|REXX}}== |
=={{header|REXX}}== |
||
No assumptions were made concerning line/record termination, as REXX takes care of that. |
|||
<lang rexx>/*REXX pgm reads a file, and displays the lines (records) of the file in reverse order. */ |
<lang rexx>/*REXX pgm reads a file, and displays the lines (records) of the file in reverse order. */ |
||
parse arg iFID . /*obtain optional argument from the CL.*/ |
parse arg iFID . /*obtain optional argument from the CL.*/ |