print "first item in the array is $myArray[0] \n"; print "doing the replace: \n"; if($myArray[0] =~ s/"//g){ print "it happened\n"; } else { print "nothing to replace, apparently\n"; } print "first item in the array is now $myArray[0] \n";