Thread split() (10 answers)
Opened by taikahn22 at 2008-04-05 15:13

Gast Gast
 2008-04-05 16:59
#107914 #107914
oder:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
use strict;
use warnings;

use Data::Dumper;

my %stuff= split(/,|=/,do {
  open my $test, '<', 'test.txt' or die "I/O Error: $!\n";
  local $/;
  $_=<$test>;
  $_=~s/[\r\n,]+/,/;
});

print Dumper \%stuff;

View full thread split()