Jackie Jackie wrote:
> Ruud:

#!/usr/bin/perl -w
use strict;

local $/ = "\n\n";
my @data = map [ map [ split /\n/ ],  split /\n&\n/ ], <DATA>;
>
> This time the code worked. Please explain it to me.

Try this version, and find out yourself:


#!/usr/bin/perl -w
use strict;
use Data::Dumper;

local $/ = "";  # see perldoc perlvar
my @data = map [ map [ split /\n/ ],  split /\n&\n/ ], <DATA>;
print Dumper(\...@data);

__DATA__
[your data]

--
Ruud

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to