If that is true then you can use this else statement at the top:
else{ if($name eq "029"){$var{'028'}.=",".join(':',@data)."\n"} else{$var{$name}.=join(':',@data)} } This way both elements are put into the 028 variable. This will look much better if you use absolute positioning. |
cool,
That's going to work. When you say absolute positioning does this mean that I can set the position of the output to match the template or would it be more to it than that? I guess I can use sed to put some code into the template as it is converted to code. The unix system we use has the same problem, you need to look at the output and adjust the tempate to correct it. However it's still better than the dos one we have now. It is preset into a format that cannot be changed. Also the output is gone before you can see it (no scrolling) so it's almost useless while it's running. If you get time maybe you can show me an example of positioning. Do you think there is an advantage using perl over sed? I have made this from my little sed script, Seems a bit long, but maybe it's faster, better? Code:
It works fine, I'm just wondering if there is an advantage. Congrats on the Mod status, We're glad you have decided to take it. |
The escape sequences are like this
#\033[TOP;LEFTH just replace TOP and LEFT with the TOP and LEFT positions. so for your template it may be: Code:
\033[2;30H *********** OBSERVERS LOG ********** |
ok, That's great.
I will look at setting this up. Any recommendation on a good perl book for beginners. Thanks again |
I'm afraid I'm not really a book person. The only one I have is "PERL, CGI and JAVASCRIPT Complete" but this is mostly web based stuff (this was the reason I started with perl in the first place)
All the answers I have needed I found on the web. The positioning should work with your awk script too. As for the speed and performance difference I have no idea. I think you would need to run some tests with the live data. |
cool
I guess I will start with the man pages. |
Any questions just give me a shout. (I usually lurk about the programming forum anyway)
|
ok, thanks
|
All times are GMT -5. The time now is 09:46 AM. |