$file = "/Users/me/Desktop/test.xls"; $printer = "HP_DESKJET_930C"; system ("lp -d $printer $file");