in reply to Re: Reading Lines from Text file
in thread Reading Lines from Text file

Why unportable? There are versions of "tail" and "head" for various OSses.


holli, /regexed monk/

Replies are listed 'Best First'.
Re^3: Reading Lines from Text file
by malduarte (Initiate) on Feb 02, 2006 at 23:00 UTC
    Even if there are versions available for other OSses:
    • not every tail and head accept the same set of arguments
    • you may not have a compiler available to compile new tools
    • you may not able to install new software on the machine you're working,
    • Since you're using backticks, you're relying on whatever shell you have available, environment variables, aliases, (...)
    The safest way is to rely only on the Perl interpreter.