TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:15822] perl and text-delim database
Ben,
Attached are the ways I like to do it (TMTOWTDI), but you might find #2
easier to understand (no use of $_ or references). Good Luck,
Troy
Ben Luey wrote:
>
> I've got I think a simple perl question:
>
> I've got a mailing list in a text-delim format:
>
> name1<tab>address1<tab>stuff1
> name2<tab>address2<tab>stuff2
> ...
>
> How can I get that into an array or something in perl, so I can control
> each field?
>
> Right now I have
>
> open(list, "file"){
> @list = <list>
>
> but I don't know how to manipulate each field in a row
>
> ex:
>
> print (@list[1]);
>
> prints the 2nd line, but how I can print out the 2nd field of the second
> line?
>
> Any links to good web-sites with tutorials would be great.
>
> Thanks,
>
> Ben
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org
--
<a href="http://umn.edu/~john1536">Troy Johnson</a>
Conservatism is the blind and fear-filled worship of dead radicals.
name1 address1 stuff1
name2 address2 stuff2
name3 address3 stuff3
listproc1.pl
listproc2.pl