Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: how to read a particular paragraph from middle of a file line by line and enter each string in the line as an element of an array

by Anonymous Monk
on Nov 28, 2011 at 07:59 UTC ( [id://940321]=note: print w/replies, xml ) Need Help??


in reply to how to read a particular paragraph from middle of a file line by line and enter each string in the line as an element of an array

Pretend a file is a book that you're holding in your hand

You would use the same logic as reading a book

First step is writing that logic down as plain english (this is what the program does, this is how it does it)

No scratch that, first step, is explaining out loud what the problem is (read book to blah blah), and how you're going to solve it (open book, turn page, read line, blah blah )

Before you write any code (or perl-like pseudocode) you should at least read perlintro (and try out all the examples).

See an annotated example of pseudocode

Based on your post Read block of file and print to html table, I highly recommend reading a few chapters from Beginning Perl

See also How do I post a question effectively?

  • Comment on Re: how to read a particular paragraph from middle of a file line by line and enter each string in the line as an element of an array

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-04-23 18:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found