my ($a, $b, $c) = $temp =~ m/(\w+)\n/g; #### #!/usr/bin/perl -w use strict; my $temp = "DATA\nFile\nHello\n"; my ($a, $b, $c) = split(/\n/, $temp); print "$a:$b:$c\n"; #### my @list = split(/\n/, $temp);
## #!/usr/bin/perl -w use strict; my $temp = "DATA\nFile\nHello\n"; my ($a, $b, $c) = split(/\n/, $temp); print "$a:$b:$c\n"; ##
## my @list = split(/\n/, $temp);