[SVN] Bundle commit 99

Eric Hsu erichsu at math.sfsu.edu
Thu Jan 20 18:03:34 UTC 2005


At 11:04 AM +0100 1/20/05, Allan Odgaard wrote:
>I'll look into it later today or tomorrow. Curious, do you know 
>"perl -p"? Basically it loops over stdin, so you can do (to strip 
>non-ASCII):
>    perl -pe 's/[^\t\n\x20-\x7E]+//g'

Yeah, I know that's shorter.  :)

But I usually work out these little one-liners in full Perl, and like 
to have the wrapper in line for easier testing. Then I mush it with a 
TM command 'turn into One-Liner'.  Also, for some commands, I prefer 
to do some preprocessing, e.g. with CocoaBones, or post-processing, 
and it's hard to use -p with that.

So the upshot is, I appreciate the tip; but for my hacking style it's 
easier to have the loop explicit.

best, Eric
-- 
Eric Hsu, Assistant Professor of Mathematics
San Francisco State University
erichsu at math.sfsu.edu
http://math.sfsu.edu/hsu



More information about the textmate-dev mailing list