6 Einträge, 1 Seite |
1
2
3
4
5
6
#!/usr/bin/perl -w
open SOURCE,"<$ARGV[0]";
@zeilen = <SOURCE>;
@zeilen =~s/ü/&ü/g;
close SOURCE;
print @zeilen;
QuoteApplying substitution (s///) to @array will act on scalar(@array) at ./xmlsc_to2 line 5.
Can't modify array dereference in substitution (s///) at ./xmlsc_to2 line 5, near "s/ü/\&\ü/g;"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /usr/bin/perl
use warnings;
use strict;
my $infile = $ARGV[0]; # 1. parameter auslesen
-f $infile or die "Error: '$infile' is not a file\n";
open (IN, $infile) or die "Error: couldn't read '$infile': $!\n";
while (<IN>) { # zeile fuer zeile einlesen => $_
$_ =~s/ü/&ü/g;
# .... usw.
print $_;
} # while
close (IN);
my $file_content = join '', <DATA>;
6 Einträge, 1 Seite |