[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] rearranging data files

On Thu, Jun 06, 2002 at 09:30:30PM +0200, Joerg Johannes wrote:
   > and vice-versa. I need something that makes "Search and replace two spaces by a \newline"
   > and afterwards a bit of rectangle-editing in emacs obsolete.
Do not know for sure whether such a program exits. But you can try perl
to the same job easily. Just tried this code and got the results you are


   chomp($line1 = <STDIN>) ;
   chomp($line2 = <STDIN>) ;

   @xline = split(/[\t ]+/,$line1) ;
   @yline = split(/[\t ]+/,$line2) ;

   for ($i = 0 ; $i <= @xline ; $i++)  {
     print "$xline[$i]   $yline[$i]\n" ;


Sridhar M.A.

Imitation is the sincerest form of television.
		-- Fred Allen

To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: