my $result = qx!kfsql -S Servername -D database -F e -s , -c \"select field1 from test where criteria = "C" and some_date \!= $processdate order by field_time desc\"!; if want to push in array then.. chomp $result; my @array= ($result=~ s/\"//g); this will push all result value into variable and you can use through out in program.