dlarochelle has asked for the wisdom of the Perl Monks concerning the following question:
I was wondering if there is any tool that could go through code and replace print with say where appropriate.
For example,
print "foo\n"; should become say "foo"; or say 'foo';Similarly print "$a\n" could become say "$a" or ideally just say $a
Manually making this type of change seems tedious and error prone. I was hoping for something similar to perltidy that could do it automatically.
P.S. If no tool like this exists, any thoughts and what it would take to hack something like this together?
Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: autoconverting print to say
by GrandFather (Saint) on Nov 14, 2009 at 00:05 UTC | |
by ikegami (Patriarch) on Nov 14, 2009 at 00:40 UTC | |
|
Re: autoconverting print to say
by Fletch (Bishop) on Nov 13, 2009 at 23:16 UTC | |
|
Re: autoconverting print to say
by chromatic (Archbishop) on Nov 13, 2009 at 22:46 UTC | |
by ikegami (Patriarch) on Nov 13, 2009 at 23:07 UTC | |
|
Re: autoconverting print to say
by ssandv (Hermit) on Nov 13, 2009 at 23:29 UTC | |
|
Re: autoconverting print to say
by Jorge_de_Burgos (Beadle) on Nov 14, 2009 at 07:02 UTC |