Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: what is the purpose of Tie::File

by afoken (Parson)
on Nov 10, 2012 at 19:23 UTC ( #1003273=note: print w/ replies, xml ) Need Help??


in reply to what is the purpose of Tie::File

Did you even try to read the documentation of Tie::File?

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.

Tie::File has its uses, but of course it introduces some overhead. For some manipulations, the overhead can become a real performance killer.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)


Comment on Re: what is the purpose of Tie::File
Re^2: what is the purpose of Tie::File
by Lotus1 (Chaplain) on Nov 11, 2012 at 00:19 UTC
    Did you even try to read the documentation...

    This question tells me you didn't even try to read what I posted, just the title. It probably wasn't the best title for this node but it was the question I had been wondering until this morning.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003273]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2014-09-17 13:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (80 votes), past polls