driving common anode 8x8 matrix using arduino mega?

Driving a common anode matrix is similar to driving a common cathode matrix, just need transistors on the "other side" of the matrix to control the multiplexing.
You will need PNP transistors between the mega pins and the matrix columns to control the current into the common anode, and then 8 mega pins with current limit resistor to sink the 8 cathoodes in each row.
The multiplex is simple - drive the cathodes, turn the anode on for column 1, pause some few mS , then off.
Repeat for colums 2-8.
Data to be written can be pulled from an array:

for (x=0; x<8; x=x+1){
cathodes = column[x] data
pulse anode[x] on, off
}