qr// won't really help in this case because your regex's are constant, i.e., they have no variables in them. You might want to optimize the process, though, by adding a terminating condition so you don't have to process the whole file (if this is all the processing you need, that is). BTW, '==' is for numerical comparisons, 'eq' is for character comparisons.:
my ($pt, $pc);
while (<DATAFILE>){
$pt = $1 if !defined $pt and /pagetitle.*?"(.*?)"/i;
$pc = $1 if !defined $pc and /category.*?"(.*?)"/i;
last if defined $pt and defined $pc;
}