http://qs321.pair.com?node_id=1028967


in reply to Re: How Can I get the Word Document Page Number in Perl Using Linux?
in thread How Can I get the Word Document Page Number in Perl Using Linux?

Never ask for a pony when you can ask for a unicorn! :-)
A Monk aims to give answers to those who have none, and to learn from those who know more.

Replies are listed 'Best First'.
Re: Your lack of ambition is troubling
by hdb (Monsignor) on Apr 16, 2013 at 18:29 UTC

    This gives the text but no page numbers.

    use strict; use warnings; use Text::Extract::Word; my $file = Text::Extract::Word->new("test1.doc"); my $raw = $file->get_text(':raw'); print $raw;
Re: Your lack of ambition is troubling
by hdb (Monsignor) on Apr 16, 2013 at 18:02 UTC

    Here is something that gives you the page numbers for a small document, say 5 pages:

    perl -e 'print "$_\n" for (1..5)'