Linux SoftwareProgrammingLibrariesTie::File 0.96

Tie::File 0.96


Tie::File can access the lines of a disk file via a Perl array. SYNOPSIS # This file documents Tie::File version 0.96
Developer:   Mark Jason Dominus
      more software by author →
Price:  0.00
License:   Perl Artistic License
File size:   66K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


Tie::File can access the lines of a disk file via a Perl array.

SYNOPSIS

# This file documents Tie::File version 0.96
use Tie::File;

tie @array, 'Tie::File', filename or die ...;

$array[13] = 'blah'; # line 13 of the file is now 'blah'
print $array[42]; # display line 42 of the file

$n_recs = @array; # how many records are in the file?
$#array -= 2; # chop two records off the end


for (@array) {
s/PERL/Perl/g; # Replace PERL with Perl everywhere in the file
}

# These are just like regular push, pop, unshift, shift, and splice
# Except that they modify the file in the way you would expect

push @array, new recs...;
my $r1 = pop @array;
unshift @array, new recs...;
my $r2 = shift @array;
@old_recs = splice @array, 3, 7, new recs...;

untie @array; # all finished

Tie::File represents a regular text file as a Perl array. Each element in the array corresponds to a record in the file. The first line of the file is element 0 of the array; the second line is element 1, and so on.

The file is not loaded into memory, so this will work even for gigantic files. Changes to the array are reflected in the file immediately. Lazy people and beginners may now stop reading the manual.

Requirements:
  • Perl
    tags the file  tie file  the array  new recs  @array new  perl array  

    Download Tie::File 0.96


     http://mirrors.evolva.ro/CPAN/authors/id/M/MJ/MJD/Tie-File-0.96.tar.gz


    Authors software

    Tie::File 0.96 (by Mark Jason Dominus)
    Tie::File can access the lines of a disk file via a Perl array.

    SYNOPSIS

    # This file documents Tie::File version 0.96


    Similar software

    Tie::File 0.96 (by Mark Jason Dominus)
    Tie::File can access the lines of a disk file via a Perl array.

    SYNOPSIS

    # This file documents Tie::File version 0.96

    Tie::Array::PackedC 0.03 (by demerphq)
    Tie::Array::PackedC is a tie a Perl array to a C-style array (packed; elements of a single, simple data type).

    SYNOPSIS

    use T

    POE::XS::Queue::Array 0.003 (by Tony Cook)
    POE::XS::Queue::Array is an XS implementation of POE::Queue::Array.

    This class is an implementation of the abstract POE::Queue int

    Language::Basic::Variable 1.44 (by Amir Karger)
    Language::Basic::Variable is a Perl module to handle parsing and implementing BASIC variables.

    SYNOPSIS

    See Language::Basic for

    nrsTable 0.3.3 (by German Kalinec)
    nrsTable library is a JavaScript script that will allow a developer to create HTML tables from arrays.

    The tables can be automatical

    XMLParser for PHP 1.0 (by Monte Ohrt)
    XMLParser is a library that assists in parsing XML documents into generic PHP arrays

    Gtk::CListModel 0.7009 (by Molaro Paolo)
    Gtk::CListModel is a simple data model with Gtk::Clist views.

    SINOPSYS
    my $model = tie @data, 'Gtk::CListModel',

    AVL Array 1.2 (by Martin Knoblauch Revuelta)
    AVL Array is an STL-like container for C++ that fills the gap between vector (or deque) and list, providing both fast random access a

    Convert::UU 0.52 (by Andreas Koenig)
    Convert::UU is a Perl module for uuencode and uudecode.

    SYNOPSIS

    use Convert::UU qw(uudecode uuencode);
    $encoded_string =

    XML::Simple::DTDReader 0.04 (by Alex Vandiver)
    XML::Simple::DTDReader is a simple XML file reading based on their DTDs.

    SYNOPSIS

    use XML::Simple::DTDReader;

    my $ref =


    Other software in this category

    zlib 1.2.3 (by Jean-loup Gailly)
    zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library for use on virtually any comp

    libjpeg v6b (by Independent JPEG Group)
    libjpeg is a library for handling the JPEG (JFIF) image format

    OpenSSL 0.9.7c (by The OpenSSL Project Team)
    The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implement

    libxml2 2.6.27 (by DV)
    Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), libxml2 library i

    GNU C library 2.4 (by Andreas Jaeger)
    GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions.

    GNU C library is us

  •     search


    Featured Software

    jEdit 4.3 pre8
    jEdit is an Open Source text editor written in Java

    Opera 9.02
    Surf the Internet in a safer, faster, and easier way with Opera browser

    GNU Aspell 0.60.4
    GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


    Subscribe in Rojo
    Google Reader
    Add to My Yahoo!

    Add to My AOL
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    Add 'nixbit linux software' to Newsburst from CNET News.com
    del.icio.us nixbit linux software


    Top tags