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

Re: Manipulating a file

by rnewsham (Curate)
on Apr 30, 2014 at 13:18 UTC ( [id://1084504]=note: print w/replies, xml ) Need Help??


in reply to Manipulating a file

There are some problems with the code you pasted. It will not compile as there is a missing } somewhere, as you did not indent the while block it is not clear where it should be but I guess before &heading. Which brings us to problem two you call &heading but there is no sub heading, you probably want to rename heading2 to heading. A couple of other minor points you probably want $ARGV[0] instead of @ARGV[0]. It is also more common to use heading() instead of &heading.

As for what your code is doing and whether or not it is the best approach, I agree with GotToBTru. It would help if you provided an example of the input data and an example of the desired output.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-20 03:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found