Skip to content

Perl Conditional Replace Depending On Match

So, as I write patches for various awful build systems, one of the things I try to do is slim down the patch file and make it easier to read. Changing “foobar-1.orig” to just a and “foobar-1” to just b makes a difference. Rather than manually edit the patch file, I turn to my dear friend, the regex search-and-replace. But, it gets to be a bit tiring editing essentially the same regex twice to get nearly identical results.

Now On Linode

So I got a bit tired of trying to run a server from home on an old Pentium II 233 MHz computer with a whopping 128 MiB of RAM.

Dell 1350cnw on Gentoo Linux with CUPS

You’d think that a company that had produced and does produce some Linux based products would also provide CUPS drivers for their printers, like the Dell 1350cnw. Not so, it seems. Still, I was undeterred and found a way to make it happen.