in reply to Re: output using map
in thread output using map
I am not sure what you are trying to accomplish with the unpack A* code?
I think you're right that unpack is intended to chomp the newline (and maybe all whitespace?) from the end of each line.
(It's also unclear why chomp-ing would be necessary since lines are print-ed with a newline appended; no newline is appended in the OPed code, but maybe that potential problem was obscured by the fact that nothing was ever printed!)c:\@Work\Perl\monks>perl -wMstrict -MData::Dump -le "my $s = qq{abc defg hi \t \n}; my $t = unpack 'A*', $s; dd $t; " "abc defg hi"
Note that the keys (lines) of each file will be printed in random order.
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: output using map
by Marshall (Canon) on Mar 07, 2020 at 01:35 UTC | |
by Anonymous Monk on Mar 07, 2020 at 06:57 UTC |