use strict; use warnings; use DBI; ############ # let's say you want a histogram of State1 ############ my $dbfilename = "biohisham.sqlite"; my %attr = ( RaiseError => 1); #auto die with error printout my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfilename","","",\%attr) or die "Couldn't connect to database $dbfilename: " . DBI->errstr; my $get_state1_histo = $dbh->prepare("SELECT count(*),State1 FROM bioham GROUP BY State1 ORDER BY count(*) DESC"); $get_state1_histo->execute(); my $array_ref = $get_state1_histo->fetchall_arrayref; foreach my $row_ref (@$array_ref) { print "@$row_ref\n"; } __END__ 12 VEGF -- IL_8 -- Ang_2 -- TSP1_2 -- Maspin -- Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Permeability_leakiness -- Enolase_1 -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 6 VEGF -- IL_8 -- Ang_2 -- TSP1_2 -- Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Permeability_leakiness -- Enolase_1 -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 4 VEGF -- IL_8 -- Ang_2 -- Maspin -- Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Enolase_1 -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 3 VEGF -- IL_8 -- Ang_2 -- TSP1_2 -- Maspin -- Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Permeability_leakiness -- Enolase_1 -- Hmox -- TWIST1 -- Erythropoietin 3 VEGF -- IL_8 -- Maspin -- Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Enolase_1 -- Hmox -- TWIST1 -- Erythropoietin 2 VEGF -- Ang_2 -- TSP1_2 -- Maspin -- Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Permeability_leakiness -- Enolase_1 -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 2 VEGF -- IL_8 -- Ang_2 -- TSP1_2 -- Maspin -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Permeability_leakiness -- Enolase_1 -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 1 Ang_2 -- Maspin -- Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- TWIST1 -- Erythropoietin 1 IL_8 -- Ang_2 -- Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Enolase_1 -- TWIST1 -- Erythropoietin 1 IL_8 -- Ang_2 -- TSP1_2 -- Glut1_4 -- LDHA -- Permeability_leakiness -- S6k1 1 IL_8 -- Maspin -- Glut1_4 -- P21 -- LDHA -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 1 Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- Ang_1 1 TSP1_2 -- Invasiveness_migration -- Senescence -- Glut1_4 -- BCL_XL -- Permeability_leakiness -- Enolase_1 -- Ang_1 -- Erythropoietin 1 TSP1_2 -- Senescence -- Glut1_4 -- BCL_XL -- Enolase_1 -- Ang_1 -- TWIST1 -- Erythropoietin 1 VEGF -- Ang_2 -- Invasiveness_migration -- Senescence -- Glut1_4 -- Enolase_1 -- Hmox -- Erythropoietin 1 VEGF -- Ang_2 -- Maspin -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Enolase_1 -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 1 VEGF -- Ang_2 -- TSP1_2 -- Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Permeability_leakiness -- Enolase_1 -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 1 VEGF -- Ang_2 -- TSP1_2 -- Senescence -- Glut1_4 -- LDHA -- Enolase_1 -- Ang_1 -- S6k1 -- Hmox 1 VEGF -- Ang_2 -- TSP1_2 -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Permeability_leakiness -- Enolase_1 -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 1 VEGF -- IL_8 -- Ang_2 -- Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Permeability_leakiness -- Enolase_1 -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 1 VEGF -- IL_8 -- Ang_2 -- Maspin -- Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Enolase_1 -- Hmox -- TWIST1 -- Erythropoietin 1 VEGF -- IL_8 -- Ang_2 -- Maspin -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Enolase_1 -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 1 VEGF -- IL_8 -- Ang_2 -- TSP1_2 -- Invasiveness_migration -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Permeability_leakiness -- Enolase_1 -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 1 VEGF -- IL_8 -- Ang_2 -- TSP1_2 -- Maspin -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Permeability_leakiness -- Enolase_1 -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 1 VEGF -- IL_8 -- Maspin -- Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Permeability_leakiness -- Enolase_1 -- Hmox -- TWIST1 -- Erythropoietin 1 VEGF -- IL_8 -- TSP1_2 -- Maspin -- Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Permeability_leakiness -- Enolase_1 -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 1 VEGF -- Maspin -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Enolase_1 -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 1 VEGF -- Maspin -- Invasiveness_migration -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Ang_1 -- S6k1 -- Hmox -- TWIST1 -- Erythropoietin 1 VEGF -- TSP1_2 -- Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- LDHA -- Permeability_leakiness -- Ang_1 1 VEGF -- TSP1_2 -- Maspin -- Invasiveness_migration -- Senescence -- Glut1_4 -- P21 -- BCL_XL -- Permeability_leakiness -- Ang_1