in reply to Re^2: "chomp" not working
in thread "chomp" not working
a,b,c,d
e,f,g,h
i,j,k,l
@arr1 before the chomp should like like above when printed out.
Why would you expect that?
>perl -wMstrict -le "my $s = qq{a,b,c,d\ne,f,g,h\ni,j,k,l}; printf qq{$s}; printf qq{\n}; ;; my @ra = split /\n/, $s; printf qq{@ra}; printf qq{\n}; ;; chomp @ra; printf qq{@ra}; printf qq{\n}; " a,b,c,d e,f,g,h i,j,k,l a,b,c,d e,f,g,h i,j,k,l a,b,c,d e,f,g,h i,j,k,l
|
|---|