Thread empty Files (9 answers)
Opened by paidopoieo at 2005-12-07 03:12

renee
 2005-12-09 09:04
#60744 #60744
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Hi,

es sind keine Richtlinien, es sind nur Tipps...

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

use strict;
use warnings;

my $infile = '/path/to/infile.fa';
my $outfile = '/out/outfile.txt';
my %single_hash;

open(INFILE,"<$infile") or die $!;
while(my $line = <INFILE>){
chomp $line;
$single_hash{$line} = 1;
}
close INFILE;

open(OUTFILE,">$outfile") or die $!;
for my $key(keys(%single_hash)){
print OUTFILE $key,"\n";
}
close OUTFILE;
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 empty Files