On Tue, 12 Aug 2003 01:29:39 -0400 (EDT), [EMAIL PROTECTED] (Perlwannabe) wrote:
>Here is the little script that I am working with and, obviously, is not >working: > >my $filefirst = "c:/perl/myfile.txt"; >open(FILE,"<$filefirst") || die "Could not open file for reading! $!"; >open(TEMP,">$filefirst.tmp") || die "Could not open file for writing! $!"; #are you using windows? binmode FILE; #need binmode under windows binmode TEMP; ># I have used the . . . to show that the entire hex string is really there >my $hextostr = '\x54\x68\x69\x73 . . . \x79\x2E\x22'; >while(<FILE>){ > $_ =~ s/$hextostr/placey/gi; > print TEMP $_; >} > > >Perhaps I am attacking this problem wrong by using hex, but it seems >easier to use then text which has carriage returns, tabs, and spaces. > >I hope this explains the situation. > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]