Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Remove a Line

by PilotinControl (Scribe)
on Mar 31, 2013 at 22:00 UTC ( #1026388=note: print w/ replies, xml ) Need Help??


in reply to Re: Remove a Line
in thread Remove a Line

No that just keeps the output from going to the terminal screen...the file still reads that line: There are Car(s)


Comment on Re^2: Remove a Line
Re^3: Remove a Line
by Anonymous Monk on Mar 31, 2013 at 22:42 UTC
    What file?

      The Data file here is the output to the file and the screen:
      There are 16 Car(s); <---- This line needs to be removed
      There are 4 Hopper Car(s) <---- This is the output
      Which is false there are Not 16 cars there are only 4 cars.

        What file? You're opening two files, both are "data" files, do you mean the input file?

        Your program opens an input file for reading

        opens an output file for writing

        writes stuff to output file

        It doesn't modify input file

        Do you want to modify the original file, do you want to rename outputfile to inputfile?

Re^3: Remove a Line
by CountZero (Bishop) on Apr 01, 2013 at 08:59 UTC
    Now you have me totally confused.

    What do you mean by "the file still reads that line". Which file reads which line?

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2014-12-19 22:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (94 votes), past polls