Please note that this code, as stated by you, does not work as such, as a oneliner, in a shell in windows (which I use). A windows user should use leave out the perl -e
and the single quotes '
at start and end before trying it out as a script in windows.