in reply to Re: Building up a string from a text file
in thread Building up a string from a text file
use strict; my @outputs; while (<DATA>) { my @fields = split; $outputs[$_] .= $fields[$_] . '|' for 0 .. 3; } chop @outputs; # remove final '|'; print "$_\n" for ( @outputs ); __DATA__ ID1 > 66 ID2 between 6 10 ID3 < 7
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|