smanicka has asked for the wisdom of the Perl Monks concerning the following question:
Sandhya
Update: I tried editing the responses to see if that would work.It says cannot do inplace edit without backup at line 9#!/usr/bin/perl use warnings; use strict; my @files = <H:\*.pdf>; @ARGV = @files; $^I = ''; while ( <> ) { s/\/Im0 Do//g; print; }
Update
It compiles and runs without gitch, but the pdf pages are blank and the permissions have changed to give write privilege to everyone i think.UPDATE, I found this.http://aspn.activestate.com/ASPN/Mail/Message/perl-win32-users/3562086..would someone like to take a shot at figuring out whats wrong?
UPDATE
FINALLY GOT IT TO WORK!!!!#!/usr/bin/perl BEGIN {(*STDERR = *STDOUT) || die;} use diagnostics; use warnings; use strict; $| = 1; my @files = <H:\*.pdf>; @ARGV = @files; $^I = '~'; while (<>) { binmode ARGVOUT if $. == 1; s/\/Im0 Do//g; print; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: in place edit - how to do
by jwkrahn (Abbot) on Jan 14, 2009 at 21:04 UTC | |
|
Re: in place edit - how to do
by ikegami (Patriarch) on Jan 14, 2009 at 21:30 UTC | |
|
Re: in place edit - how to do
by FunkyMonk (Bishop) on Jan 14, 2009 at 22:52 UTC | |
by ikegami (Patriarch) on Jan 14, 2009 at 23:06 UTC | |
by FunkyMonk (Bishop) on Jan 14, 2009 at 23:11 UTC | |
by ikegami (Patriarch) on Jan 14, 2009 at 23:56 UTC | |
|
Re: in place edit - how to do
by zentara (Cardinal) on Jan 14, 2009 at 21:04 UTC | |
|
Re: in place edit - how to do
by moritz (Cardinal) on Jan 14, 2009 at 21:07 UTC | |
by smanicka (Scribe) on Jan 14, 2009 at 21:14 UTC |