in reply to matlab to perl

There is a PDL::NiceSlice which claims to have much more nicer syntax.
I haven't tested it.
use PDL::NiceSlice; #something......... recA = $U(:,1:$ns)*$S(1:$ns,1:$ns)*$Vt(1:$ns,:);

Hope that is what you seeked.