Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^2: Remove a Line

by PilotinControl (Pilgrim)
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)

Replies are listed 'Best First'.
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?


    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
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?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1026388]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2018-05-22 20:39 GMT
Find Nodes?
    Voting Booth?