in reply to Re^2: Comparing masses in two txt files
in thread Comparing masses in two txt files
The grep is there to skip blank lines hence the length. Putting the chomp in the grep in that fashion avoids a map:
my @data1 = grep length, map chomp, <$in1>;
You don't "pass out" the value from grep. It tests the result returned for each element of the source list to determine if the element is placed in the output list.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Comparing masses in two txt files
by johngg (Canon) on Nov 05, 2008 at 23:32 UTC |