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

Re: replace java code when not commented

by gube (Parson)
on Mar 28, 2006 at 00:41 UTC ( [id://539622]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to replace java code when not commented

#!/usr/local/bin/perl while(<DATA>) { $_ =~ s/^(public[^\n]+)/\/\*$1\*\//si; print $_; } __DATA__ /** * public void method1(); * is deprecated */ public void method1();

Replies are listed 'Best First'.
Re^2: replace java code when not commented
by zer (Deacon) on Mar 28, 2006 at 00:58 UTC
    this is good! Use gubes method. heres my extention applied to it.
    while(<DATA>) { $_ =~ s/^\s*((public|private)[^\n]+)/\/\*$1\*\//si; print $_; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://539622]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.