in reply to print to output problem

If you really intend to discard part of the result of a split, it's clearer to write

(undef, $etc) = split(/\s+/, $_) if (/^# input.*/);
than to write
($etc,$etc) = split (/\s+/, $_) if (/^# input.*/);

Replies are listed 'Best First'.
Re^2: print to output problem
by Anonymous Monk on Jul 07, 2004 at 16:50 UTC
    i know it returning the correct value by using
    print OUT (split)[3], "\n" if /^\s+\S+\s+\S+\s+$NUM17\b/;
    its just the fact that the out puts are all strings of the same answer