Thread ein paar fragen - hilfe :/: njaa perl halt ^^ (46 answers)
Opened by Gast at 2005-07-05 21:49

renee
 2005-07-11 19:47
#5195 #5195
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Code: (dl )
1
2
3
4
5
<form action="/cgi-bin/comments.pl" method="post">
<p>Bitte Logfilenamen eingeben: <br>
<input name="Logfilename" size="40"> </p>
<p> <input type="submit" value="Ok"></p>
</form>


Skript:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /usr/bin/perl

use strict;
use warnings;
use CGI;
use CGI::Carp qw(fatalsToBrowser);

my $cgi = CGI->new();
print $cgi->header();

my $file = $cgi->param('Logfilenam');

die "$file doesn't exist" unless(-e $file);

open(my $fh, "<$file") or die $!;
while(<$fh>){
print;
}
close $fh;
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread ein paar fragen - hilfe :/: njaa perl halt ^^