Thread splitten in array (8 answers)
Opened by kabazza at 2007-01-10 16:07

renee
 2007-01-10 16:11
#73047 #73047
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl

use strict,
use warnings;

my $file = '/path/to/file';
my @array;
{
local $/ = "\n//\n";
open my $fh,'<',$file or die $!;
@array = <$fh>;
chomp @array;
close $fh;
}



Mehr zu $/ unter perlvar...
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 splitten in array