in reply to Re^2: Read in a file containing the criteria for a program when it runs
in thread Read in a file containing the criteria for a program when it runs

You can access elements by their nubmers. For example, print $filter[0]->[0],"\n" should print 1000_Genomes.

-> is necessary because @filter array contents are not real arrays, but references to arrays.

Sorry if my advice was wrong.

Replies are listed 'Best First'.
Re^4: Read in a file containing the criteria for a program when it runs
by dkhalfe (Acolyte) on Jul 18, 2012 at 19:14 UTC

    Would it be safe to use references to arrays in a program that will eventually sort through a TON of data? Also, through using references to array, I should be able to call on the individual elements when running my code, correct? Thank you so much. You have really helped me out!

      If file is corrupted, split /\t/,$_ will return something else and some of the array elements may eventually become undefined. Perl will throw a warning if you use warnings when you try to do something with such elements. You may want to check elements using defined, but this can slow down your program.

      When you are working with TONS of data, it can be useful to try SQL (sqlite, for example).

      Yes, you will be able to access all of your data using array references. Data::Dumper and x command in debugger are useful when you have troubles with acessing some data strictures in Perl.

      Sorry if my advice was wrong.

        Thanks for all of your help!