The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!/bin/bash
DIR_TO_ADD="/home/$LOGNAME/perl5/lib/perl5"

# Set PERL5LIB if it doesn't already exist
: ${PERL5LIB:=$DIR_TO_ADD}

# Append to PERL5LIB if directory not already found in PERL5LIB
if ! echo $PERL5LIB | egrep -q "(^|:)$DIR_TO_ADD($|:)"; then
    export PERL5LIB=$PERL5LIB:$DIR_TO_ADD;
fi

# PERL5LIB append text version 20120822162151