"Perl ... it could be in your $PATH " $PATH
Using $SHELL for tiny text tasks (ie sh , ksh , zsh , bash , tcsh , csh ) on BSD, OSX, Linux, AIX, Solaris with various "standard POSIX" compared to BSD, Linux and GNU extensions to sed , grep and other utilities and taking care of accounting for gawk compared to awk and older versions of tools on many server systems ... can be difficult.
perl -i.orig -ne 'print unless /^b/' test.txt
Did it work?
diff test.txt test.txt.orig
source share