in reply to quick way to add a line to a file, if it's not already present (automating tweaking of /etc/ld.so.conf for installing Image::Magick)
echo "/usr/local/lib" > /etc/ld.so.conf.d/ImageMagick.conf ldconfig [download]
Oh, and of course my /etc/ld.so.conf is just this:
include ld.so.conf.d/*.conf [download]