ajju has asked for the wisdom of the Perl Monks concerning the following question:

Hi friends,
I ran this program by typing below command
perl progname.pl

#!/usr/bin/perl #-w # use strict; use PDF::OCR2; my $p = PDF::OCR2->new('02_ProProInt2nd_Tab01.pdf'); my $text_all = $p->text; my @text_pages = $p->text; my $page_object = $p->page(1);

The following errors occured,
CHECK_PDF flag is on.. at /usr/local/lib/perl5/site_perl/5.10.0/PDF/OCR2/Base.pm line 40.
CHECK_PDF flag is on.. at /usr/local/lib/perl5/site_perl/5.10.0/PDF/OCR2/Base.pm line 40.
Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/site_perl/5.10.0/PDF/OCR2/Page.pm line 100.
CHECK_PDF flag is on.. at /usr/local/lib/perl5/site_perl/5.10.0/PDF/OCR2/Base.pm line 40.
Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/site_perl/5.10.0/PDF/OCR2/Page.pm line 100.

Replies are listed 'Best First'.
Re: Errors in running perl program
by marto (Cardinal) on Nov 30, 2010 at 06:38 UTC
    #!/usr/bin/perl use strict; use warnings; use PDF::OCR2; $PDF::OCR2::CHECK_PDF = 1; my $pdf = PDF::OCR2->new('/home/marto/02_ProProInt2nd_Tab01.pdf'); print $pdf->text;

    For sample PDF outputs the text:

    Along with some warnings.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Errors in running perl program
by perl_lover (Chaplain) on Nov 30, 2010 at 06:27 UTC
    Never disable your warnings and strict pragma. It is one of the PBP. Moreover what you are getting is a warning and not an error.