>>>>> "CD" == C DeRykus <[email protected]> writes:
CD> On Jul 21, 3:42 pm, [email protected] ("Uri Guttman") wrote: >> >> perl -pe 's/(\S+)\s+(\S+)/$2 $1/' file >> CD> Since the weather's good for golf... i was vaguely hinting at golf but i wanted a fairly normal looking solution as well! CD> perl -pale ' $_=join " ", reverse @F' file that is longer than mine! CD> perl -ple ' /\s+/;$_="$' $`" ' file what if there are leading or trailing spaces in the data source! :) uri -- Uri Guttman ------ [email protected] -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
