Eri Mendz wrote:
hello everyone,


this just prints the time field on each line until finish of loop. i
tried using += operator to get sum but i end up getting errors. how do i
do this? i checked my script with perl's -c flag and it says syntax OK
but i get errors when i run the script in command line:

Use of uninitialized value in concatenation (.) or string at ./diamond-optr.pl line 15, <> line 20.
Use of uninitialized value in concatenation (.) or string at ./diamond-optr.pl line 15, <> line 21.
Use of uninitialized value in concatenation (.) or string at ./diamond-optr.pl line 15, <> line 22.

This looks like it might be caused by lines in your log file that do not have 8 space delimited fields, in other words it is trying to print the time field, but the time field does not exist (has not been initialized) so it is warning you. You should check that $string[7] is defined.

this is printed in first 3 lines before printing the individual time
fields.
This is because STDERR is displayed before STDOUT in your terminal, I think ;-).

Don't know why your addition would be failing, you would have to add back in to the script how you were doing that for us to tell.

once i solve this problem i want the perl script to run each
time i go offline, so i reckon this should be fired in ppp init file or
something.  this i dont know as well. kindly help. my home box is
mandrake 9 and using wvdial in console to go online. TIA.

been a while since I used wvdial but I thought there was a setting for a script to run on shutdown, although that might have been the WM applet I was running wvdial with. the ppp0-down (or some such) should be able to fire your script for you.

http://danconia.org


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to