s/.+/$bef[$mid$aft/: (SYNTAX ERROR: "scalar found where operator expected"...) #### s/.+/$bef\[$mid$aft/;