Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Answer: How do you write to the middle of a file?

by devslashneil (Friar)
on Jun 13, 2003 at 00:54 UTC ( #265549=categorized answer: print w/replies, xml ) Need Help??

Q&A > files > How do you write to the middle of a file? - Answer contributed by devslashneil

#!/usr/bin/perl use Tie::File; my $filename = 'foo.dat'; tie @array, 'Tie::File', $filename or die "Cannot open $filename\n"; @array[5] = "Hello, World!\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2020-04-03 17:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The most amusing oxymoron is:
















    Results (30 votes). Check out past polls.

    Notices?