Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Manipulating a file

by rnewsham (Curate)
on Apr 30, 2014 at 13:18 UTC ( #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
Node Status?
node history
Node Type: note [id://1084504]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2020-11-27 12:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?