IO::Lines(3)
π IO::Lines β¨
okay so bestie, welcome to IO::Lines(3) β it's a User Contributed Perl Documentation page and honestly it's giving "tiny module, big energy". Sit down, hydrate, let's go π«Ά
πΈ NAME πΈ
IO::Lines β an IO:: interface for reading/writing an array of lines π
like, literally, that's the whole vibe. an array. of lines. with IO on top.
β¨ SYNOPSIS β¨
use IO::Lines;
### See IO::ScalarArray for details
that's it, that's the snippet π and yes, the comment is doing all the heavy lifting β go look at IO::ScalarArray for the full tea.
π¦ DESCRIPTION π¦
Okay so picture this: this class makes objects that behave just like FileHandle (or IO::Handle) objects β except the twist is you can use them to write to (or read from) an array of lines π. It's "tiehandle" capable as well, which, slay.
This is a subclass of IO::ScalarArray where the underlying array keeps its data in a line-oriented format. Meaning: every element ends in a "\n" β with the possible exception of the final element π. The way this makes getline() much more efficient?? iconic. So if you're planning on doing line-oriented reading/printing, this is the class you want, periodt.
The print() method will enforce this rule, so you can print arbitrary data to the line-array and it'll break the data at newlines appropriately π
no cap, it handles that for you.
See IO::ScalarArray for full usage and warnings β fr fr, go read it, the caveats live over there π
β VERSION β
$Id: Lines.pm,v 1.3 2005/02/10 21:21:53 dfs Exp $
π AUTHOR π
Eryq (eryq@zeegee.com). President, ZeeGee Software Inc (http://www.zeegee.com). main character energy tbh π
πΈ CONTRIBUTORS πΈ
- Dianne Skoll (
dfs@roaringpenguin.com). π«Ά
π COPYRIGHT & LICENSE π
Copyright (c) 1997 Erik (Eryq) Dorfman, ZeeGee Software, Inc. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
k bye bestie, that's the whole page π this one shipped as perl v5.42.0 dated 2020-06-04 β and that's the cute lil sign-off, catch you on the next manpage π§ββοΈπ·
π¦ where this page comes from
- opensuse-leap 16.0: perl-IO-stringy 2.113-160000.2.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms