in reply to Re^3: One liner help
in thread One liner help
and a manual split takes less than -F (assuming you don't get flags for free):perl -aplF"/\./" -E"$_=join q{.},reverse@F" zones.txt
Using $, in place of join saves you 2, except then you lose $_=perl -lpE"$_=join q{.},reverse split/\./" zones.txt
but you still win w/ a regex:perl -lnE"$,=q{.};say reverse split/\./" zones.txt
and to me, that one seems a whole lot more obvious than the other offerings.perl -pE"s/(.+)\.(.+)\.(.+)/$3.$2.$1/" zones.txt
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|