Hey Hraban,
not to be a PITA, but with OS X 10.3, we moved up to perl 5.8.1. And in
my gentoo installation, I'm now at perl 5.8.4, yessirre! ;-)
Best
Thomas
On Jun 7, 2004, at 9:45 PM, Henning Hraban Ramm wrote:
MacOS X has also only 5.6 if you don't install a newer one yourself,
and with newer t
Am Sonntag, 06.06.04, um 23:28 Uhr (Europe/Zurich) schrieb Thomas A.
Schmitz:
Well, if you put the
use open ':utf8';
in the header of your perl script, it should work without the hex
editor
Not needed with Perl 5.8.x and a proper UTF8 file.
And just for the record: to put the entire file in one
Well, if you put the
use open ':utf8';
in the header of your perl script, it should work without the hex editor
(btw: I would recommend using emacs in hex mode (M-x hexl-find-file).
And just for the record: to put the entire file in one array, use this:
my @lines = <>;
my $text = join "", @lines
On Sun, 6 Jun 2004 11:09:32 +0200, Henning Hraban Ramm <[EMAIL PROTECTED]>
wrote:
-
#!/usr/bin/perl -w
use strict;
use warnings;
my ($Source, $Target) = (shift, shift); # gets 2 file names from command
line
my %conv = (# enhance as needed
"\xD8xA7" => "A",
"\xD8xA8" => "
Am Sonntag, 06.06.04, um 02:19 Uhr (Europe/Zurich) schrieb Idris Samawi
Hamid:
open(NEW,">new.tex"); #opens file to print out the result
better:
open NEW, ">", "new.tex" || die $!;
$_ =~ s/\xD8\xA7/A/g; #this is the actual conversion
if you work with $_ you can leave it out, simply:
s/\xD8\xA7/A/