Hello, to prepare a (non-technical or -mathematical) txt-file for use with tex, i have to replace a few things: umlauts, underscores, special characters and so on.
My problem: I also want to replace quotions, depending whether they are at the beginning or the end of a word. For example "tick" should become ``tick''. Annoyingly, my script just gives me ``$1ic$1''. Any ideas? regards tannhauser use strict; use warnings; my $t = " \"tick\" "; #all replacements are in %h, #i took out the working ones. my %h = ( '(\w)"\s+?' => '$1\'\'', '\s+?"(\w)' => '``$1' ); while ((my $old, my $new) = each (%h)) { $t =~ s/$old/$new/g; } print $t; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/