The example below uses the CAM::PDF module, which you use here and I suspect this post relates to.
#!/usr/bin/perl
use strict;
use warnings;
use CAM::PDF;
my $pdf = CAM::PDF->new('test.pdf');
my $pagecontent = $pdf->getPageContent(1);
# $pagecontent now holds the text within the first page.
# say I want to replace the word Release with Distribution.
$pagecontent =~ s/Release/Distribution/;
$pdf->setPageContent(1, $pagecontent);
$pdf->cleanoutput('test_replace.pdf');
If you have any interest in learning Perl I suggest you take the time to read:
|