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

Re: [MacPerl] Stupid, non-Mac based PERL question



At 10.57 7/2/97, Strider wrote:
>Number[tab]Username[tab]Unneeded data[tab]ditto[tab]... there are fifteen
>fields total, and then a newline at the end.

>All I want is the username, perferably in an array, one entry per username.
>How would I pattern match/replace to get this? Is that even the route I
>should take?

#untested code
open(F,"filename");
while($line = <F>) {
        @f = split(/\t/,$line);
        push @usernames, $f[1];
}
close(F);

--
Chris Nandor                 pudge@pobox.com                 http://pudge.net/
%PGPKey=('B76E72AD',[1024,'08 24 09 0B CE 73 CA 10  1F F7 7F 13 81 80 B6 B6'])



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch