sub xx { wantarray ? ( qw/wrong wrong wrong/ ) : 'right' } # use scalar to force scalar context print scalar (xx()); # use prototypes sub ss($) { return $_[0] } print ss(xx()); # use the . operator but it change my result. ( invalid try ) print xx() . ''; # use || or && did not work since they change my returned value