Dear mits, Is that the way your code looks ? Then the problem is that you have written - $task = 110 ^ 220 ..; It should be - $task = "110^ 220"; In any case, if using databases from perl, try to use the DBI DBD interfaces. Then you code will be use Micro$ostSQL; # Or whatever is the name of the module my $dbh = Micro$oft->connect(); # Check the perldoc for params my $query = "select ......"; # put your SQL query here my $sth = $dbh->query($query); while( @temp = $sth->fetchrow ) { # Now every loop-pass puts one row into the # list @temp. # You dont have to split anything # $temp[0] = 110 # $temp[1] = 220 } Hope this helps.