Hi everybody! I am quiet new in Perl and I got a problem with with the operator s/pattern/replacement:
My intention is to open a file, search for the pattern "DT" und replace the pattern with "SomethingElse"! The message after using my skript is "4294967294" but this is not what I want! What I want ist to display the whole file with my replacements. Maybe it is a more difficult as expected because the file I opend has got no Line-Feed in it. Here is my skript: #!/usr/bin/perl -w use strict; my $datei ; my $pattern = 'DT'; my $replacement = 'Something' ; open ( FILE, 'transa33' ) || die " canīt open file: $!"; while ( <FILE> ) { $datei = ~ s/$pattern/$replacement/ ; print " $datei\n" ; } close FILE; Many thanks in advance -- Kai -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]