sub b { print 'args=',join(",",@_),"\n"; $,=pop()-pop(); print ", = $,\n"; $x=join'',sort split//,$,; print "x = '$x'\n"; ## the line below doesn't seem to work!! @_=map{scalar reverse($_),$_ } $x; print "\@_ = ",join(",",@_),"\n"; print "\n"; $,==495?0:1+b(@_); } sub c { @a=map{ scalar reverse($_),$_ } pop; print join(",",@a),"\n"; } c(312); b(312); ==== Results when run< ==== 213,312 ## this is c() args=312 ## this is b() , = 312 x = '123' @_ = 312321,123312