From: "Dat Nguyen" <thucdat / hotmail.com>
Subject: [ruby-talk:03654] Re: Perl and Ruby: an Irony
Date: Sat, 24 Jun 2000 20:16:11 EDT

> The trouble is sometimes I have to fish some fields in the middle of the 
> lines, and reorder the fields to be displayed or written to a file. For 
> instance:
> 
> service, ignore, name, age, ignore, salary = split
> print "#{name}\t#{age}\t#{salary}\t#{service}\n"

line = 'my_service foo yashi 25 bar $1,000,000,000,000' # ;p

service, ignore, name, age, ignore, salary = line.split
$, = "\t"

print name, age, salary, service, "\n"
--
          yashi