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

Re^7: C style multiple line comment removal

by rovf (Priest)
on Jun 08, 2012 at 09:20 UTC ( [id://975121]=note: print w/replies, xml ) Need Help??


in reply to Re^6: C style multiple line comment removal
in thread C style multiple line comment removal

To start with: After entering the loop you are reading the first line ($line = <file1>) and throw it away (because $line is never be used again), so from this alone we can conclude that you won't recognize a comment which starts in the first line. You would have found this immediately, if you had included use strict; use warnings FATAL => 'all'; in your code.

There are more problems in your code, but I suggest you first enable strict and warnings, then try to improve the code (based on what I told you above), and if you still can't get it running, post your updated code here.
-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re^8: C style multiple line comment removal
by prassi (Acolyte) on Jun 08, 2012 at 09:27 UTC

    Thanks Ronald, got my mistake and it is working fine. Im new into perl learning a lot thanks for your help

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-19 20:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found