if ( ! `sed "/$line/p" $awsLists` ) { print "not found\n"; system qq{ echo "$line" >> "$awsLists"}; } else { print "found\n"; }