c:\@Work\Perl>perl -wMstrict -MData::Dump -le "my $output = 'something or other'; ;; $_ = ' who knows what '; my @outputlist = join s/(^\s+|\s+$)//g, $output, 'hoo', 'ha'; dd \@outputlist; print qq{default scalar after s///: '$_'}; " ["something or other2hoo2ha"] default scalar after s///: 'who knows what'