bash-3.00$ perl -e '$p = "/usr/local/whatever"; if ( $p =~ /^\/usr\/local\/(.+)$/ ) { print $1."\n"; }' #### whatever