TPIPE and avarice?

May 20, 2008
10,635
82
Syracuse, NY, USA
Whenever I Google "perl greedy" I find that Perl is greedy by default and that the modifier "?" will make it non-greedy. TPIPE's default Perl settings are backwards. Is that something TCC has any control over?
2393
 
Last edited:
May 20, 2008
10,635
82
Syracuse, NY, USA
Use the TPIPE /Perl=... option to set the greedy default.
That doesn't set any defaults; it only affects the current command (and, if the help is correct, only the immediately preceding TPIPE filter). And typing "?" is considerably easier than typing "/perl=4096,1,0,1" and accomplishes the same thing (see below). I was hoping for a once-and-for-all change; an INI option would suffice.

Code:
v:\> echo a   b | tpipe /replace=4,0,0,0,0,0,0,0,0," +","\n" /perl=4096,1,0,1
a
b

v:\> echo a   b | tpipe /replace=4,0,0,0,0,0,0,0,0," +","\n"
a


b

v:\> echo a   b | tpipe /replace=4,0,0,0,0,0,0,0,0," +?","\n"
a
b