[TxMt] help with perl search/replace

Oliver Taylor ollieman at gmail.com
Mon May 22 01:01:55 UTC 2006


>> Is there any reason the following shouldn't work?
>>
>> perl -pe 's/\n\n/foo/;'

> What you may want to do is this:
>
> 	perl -pe 'BEGIN {$/=undef} s/\n\n/foo/'

I tried that, but this does not allow me to use "^" to denote the
beginning of a line, which is critical to some of the search/replace
things I'm doing.

Any other thoughts?


More information about the textmate mailing list