summaryrefslogtreecommitdiffstats
path: root/Aufgabe2/EinString.pl
blob: 69380915642c2deb2db8137893d54e56e9bd5b17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env perl 
#===============================================================================
#
#         FILE: EinString.pl
#
#        USAGE: ./EinString.pl  
#
#  DESCRIPTION: Eine Datei in eine String hängen.
#
#      OPTIONS: ---
# REQUIREMENTS: ---
#         BUGS: ---
#        NOTES: ---
#       AUTHOR: Martin Talarczyk (MT), talarczyk.martin@fh-swf.de
# ORGANIZATION: FH Südwestfalen, Iserlohn
# Matrikel-Nr.: 10036162
#      VERSION: 1.0
#      CREATED: 22.10.2015 09:19:52
#     REVISION: ---
#===============================================================================

use strict;
use warnings;
use utf8;

binmode (STDIN, ":encoding(UTF-8)");
binmode (STDOUT, ":encoding(UTF-8)");
binmode (STDERR, ":encoding(UTF-8)");
use open ":encoding(UTF-8)";


#-------------------------------------------------------------------------------
#  Variabelen Deklarasion
#-------------------------------------------------------------------------------
my $longString;

#open file
my	$opfp_file_name = 'Rilke-Herbsttag.txt';		# input file name

open  my $opfp, '<', $opfp_file_name
	or die  "$0 : failed to open  input file '$opfp_file_name' : $!\n";


	while(my $line =  <$opfp>)
	{
		$longString = $longString . $line;
	}



#close file
close  $opfp
	or warn "$0 : failed to close input file '$opfp_file_name' : $!\n";

print $longString;