Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Remove a Line

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

    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
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1026388]
help
Chatterbox?
[moritz]: choroba in python I use jsonschema
[moritz]: I'm sure there's a Perl implementation of it too
[choroba]: it seems Kelp and similar help you a lot with dispatching, but how to do something similar with contents?
[moritz]: like JSON::Schema
[Corion]: ambrus++ # more bugs than lines
[Corion]: That's like "works on my machine" ;-)
[choroba]: I mean, I'd like to say "this path should run this sub, but first it should check the user is authenticated, has the following permissions, and the contents is valid against a given schema
[ambrus]: no, that means I haven't even tried to run it, might not even parse
[ambrus]: so it doesn't work on my machine
[choroba]: i.e. I know JSON::Schema, I'm just curious whether there's a ready solution to plug it into a web service

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2016-12-08 12:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (141 votes). Check out past polls.