Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!execu!sequoia!painter From: painter@sequoia.execu.com (Tom Painter) Newsgroups: comp.lang.perl Subject: Arrays and me :-( Message-ID: <29144@sequoia.execu.com> Date: 11 Dec 90 20:19:40 GMT Distribution: usa Organization: Execucom Systems Corp Lines: 26 I'd like to split a passwd file into a multi-dimensional array. I'd like one dimension to be the relative line number in the file, and the other to be the field in the passwd file. Such that the following would print the GCOS field from the 50th entry while () { $i++; @passwd[$i] = split(/:/); } printf "%s\n", $passwd[5,50]; However, I end up with only the logname field in the array. While I could list the parts out, I feel confident that someone has a clever answer. Please suggest away. Thanks Tom -- ----------------------------------------------------------------------------- Tom Painter UUCP: ...!cs.utexas.edu!execu!painter Execucom Systems Corp., Austin, Texas Internet: painter@execu.com (512) 327-7070 execu!painter@cs.utexas.edu Disclaimer: My Company? They'll claim all my waking hours, not my opinions. -----------------------------------------------------------------------------