use Image::OCR::Tesseract 'get_ocr'; my $image = './hi.jpg'; my $text = get_ocr($image);