Match and Update Csv


I am working with a Csv master list. After gathering data and exporting it to a "working set "csv list Id like to update my master list by matching computer names and update my ‘online’ field

any help would d be greatly appreciated.

heres what I have so far

$master = "C:\MasterList.csv"
$working = "C:\workingset.csv"

$masterlist = ipcsv $master
$workingset = ipcsv $working

 $Output = foreach ($m in $masterlist) {
    foreach ($w in $workingset) {
        if ($m.computername -like "*$($w.computername)*") { $ = $ }
$Output | Export-Csv $CsvFile -NoTypeInformation

I solved the issue I needed to remove $output and add

$masterlist | Export-Csv $master -NoTypeInformation