Using regular expressions to replace file text?

2004-12-22 Thread Matt Harp
This has to be an easy question to answer, but I've been looking and hacking for a day now and can't figure it out. I want to just do search/replace on a set of files using regular expressions. I have ActiveState 5.8.6 installed on WinXP, if that matters. I am trying it like this...

RE: Using regular expressions to replace file text?

2004-12-22 Thread Arms, Mike
Matt Harp wrote: This has to be an easy question to answer, but I've been looking and hacking for a day now and can't figure it out. I want to just do search/replace on a set of files using regular expressions. I have ActiveState 5.8.6 installed on WinXP, if that matters. I am

RE: Using regular expressions to replace file text?

2004-12-22 Thread Matt Harp
Harp; perl-win32-users@listserv.ActiveState.com Subject: RE: Using regular expressions to replace file text? Matt Harp wrote: This has to be an easy question to answer, but I've been looking and hacking for a day now and can't figure it out. I want to just do search/replace on a set

Re: Using regular expressions to replace file text?

2004-12-22 Thread $Bill Luebkert
Matt Harp wrote: Thanks Mike! I had tried single quotes but didn't think to try double quotes. I should probably be banned from this mailing list for such stupidity. but Ok, I'll push my luck... Any hints on how to make this a script that'll let me pass *.*? I seem to remember a

RE: Using regular expressions to replace file text?

2004-12-22 Thread Arms, Mike
Harp; perl-win32-users@listserv.ActiveState.com Subject: RE: Using regular expressions to replace file text? Matt Harp wrote: This has to be an easy question to answer, but I've been looking and hacking for a day now and can't figure it out. I want to just do search/replace

RE: Using regular expressions to replace file text?

2004-12-22 Thread Matt Harp
@listserv.ActiveState.com Subject: RE: Using regular expressions to replace file text? Matt Harp Thanks Mike! I had tried single quotes but didn't think to try double quotes. I should probably be banned from this mailing list for such stupidity. but Ok, I'll push my luck... Any hints on how

RE: Using regular expressions to replace file text?

2004-12-22 Thread Arms, Mike
[Decided to top-post this time since Matt is.] Under Win32, you need to set binmode() on binary files: my $file = 'myImage.jpg'; # Opening binary file for read write. open( IMAGE, +$file ) or die *** Trouble opening '$file' : $!\n; binmode( IMAGE ); I would caution you though that you