Rotating digits of Integer in Perl -


in perl, how rotate digits of integer? here sample inputs , outputs

sample input

12345 10901

sample output

51234 11090

$x = chop($x) . $x; 

or

$x = substr("$x$x",length($x)-1,length($x)) 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -