in reply to log file sorting
In a similar way it is possible to have a subroutine generate left shift or centered text.sub rj { # right justifies each argument with a length of first parameter my $len= shift; my $str=''; while (@_) { $str.= substr(' 'x12 . shift @_), $len); } return $str; } print rj(12, @d); #prints data in columns of length 12
Remember to divide a difficult problem into smaller steps. Solving these smaller steps is always easier than looking at the whole problem.
This is what I did because I have a heck of a problem understanding what you want to put where. I neither understand your sorting order ( #,B #/# #,E is alphabetically sorted??) nor where the 1 in A1 comes from.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: log file sorting
by numberninja (Initiate) on Aug 04, 2008 at 17:51 UTC | |
by jethro (Monsignor) on Aug 04, 2008 at 21:56 UTC |