#!/usr/bin/perl -w #List all the ownerless clients my $client; @list = `p4 -Ztag clients`; foreach (@list) { #Match and store the client name if (/... client/) { $client=$_ }; #If that follows with a blank Owner, print out the client name if (/... Owner $/) { print "$client"}; }