Search code examples
perlperl-data-structures

In PERL how to pull records into array


in perl ,

I have table, i have fields like RANGE1, RANGE2, AND RECORDS around 6,

i want to bring these 6 records into array, somthing like

@arr = (range1_record_1, range2_record_1, 
        range1_record_2, range2_record_2, 
        range1_record_3, range2_record_3, 
        range1_record_4, range2_record_4, 
        range1_record_5, range2_record_5);

How to pull records into array,


Solution

  • If you are using DBI, try fetchall_arrayref.