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