LPM: Re: [UKLUG] 2d array ? for perl

Ronald Edward Petty repett0 at sweb.uky.edu
Thu Dec 28 11:03:09 CST 2000


I see said the blind man,... man that was dumb.. im tokenizing it and
getting back an array of individual, i want the line before than...errrr
ron
ps how do u people love perl sometimes..

On Thu, 28 Dec 2000, Ronald Edward Petty wrote:

>
> how do u print a 2d array in perl.  Somehow i can only print the first
> word of the first entry doing this
>
> while(($line = <DATAFILE>))
>     {
>     unless ($line =~ /^#/)
>         {
>         chop($line);
>         @fields = split(/\|/, $line);
>         push(@auth, $fields[0]);
>         push(@memo, $fields[1]);
>         push(@datafile, @fields);
>         }
>     }
> close(DATAFILE);
>
>
> while(@auth)
> {
> 	print "@datafile[0]";
>  	splice(@auth, 0, 1);
> 	splice(@datafile, 0, 1);
> }
>
> I dont really know perl so :(
> Ron
>
>
>
> _______________________________________________
> UKLUG website: http://www.uky.edu/StudentOrgs/UKLUG
> UKLUG mailing list addr: Llug at slug.louisville.edu
> mailing list info: http://slug.louisville.edu/cgi-bin/mailman/listinfo/llug
>




More information about the Lexington-pm mailing list