in reply to grep for numbers

Something like this (untested) should work:
$data = '<body ...>'; push @data, $1 while $data =~ /ci=(\d+)/g;