I hope this is more readable.
Hi Experts,
My perl script reads every line in the java program. But i have a problem.
If it is something like
public void method1(String str1);
It is ok.. it reads the whole line in one shot.
But if i have something like
public void method1(String str1,
String str2);
Then it reads this sentence as two lines.
My requirement is i need to comment this line using java comments . Using my script now it happpens as
/*public void method1(String str1,*/
String str2);
Here the second line also has to be commented.
Is there any way by which i can solve this problem????????????
1)What i am doing is reading the file
2)iterating through each line.
3)check if the line starts with public
4)if so then comment that line
Zer, I hope u understood now.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.