Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Answer: How do I delete/modify one line from test file ?

( #267043=categorized answer: print w/ replies, xml ) Need Help??

Q&A > files > How do I delete/modify one line from test file ? contributed by devslashneil

Another way of removing the line would be:

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

Comment on Answer: How do I delete/modify one line from test file ?
Download Code
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 chanting in the Monastery: (6)
As of 2015-08-28 09:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (335 votes), past polls