The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Text::Head - Output the first part of text

VERSION

This document describes version 0.001 of Text::Head (from Perl distribution Text-Head), released on 2016-04-01.

FUNCTIONS

head_text(%args) -> any

Output the first part of text.

Examples:

  • Example #1:

     head_text(lines => 2, text => "line 1\nline 2\nline 3\nline 4\n"); # -> "line 1\nline 2\n"

This function is not exported by default, but exportable.

Arguments ('*' denotes required arguments):

  • hint => bool

  • lines => int (default: 10)

  • text* => str

Return value: (any)

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Text-Head.

SOURCE

Source repository is at https://github.com/perlancar/perl-Text-Head.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Text-Head

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

The head Unix command.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.