And yet not so much easier that in this instance the Awk script actually
did the job. If Perl is as distasteful to her as it is you she can always
run it without looking at the code.
To dwell on this, I'm having trouble imagining how a line like the
following...
printf("DTEND:%dT%02d%02d00\n",$1,$5/60+$4/60,$5%60+$4%60)
... when done in Perl is going to be more "write only" or need even be
very different, for that matter, given that Perl has sprintf with the
same format specifiers. More than likely $1, $5, etc. would be replaced
with meaningful names or at worst guessable two letter combos.
The Perl script above is only harder to read in being longer but it's
doing a lot more checks and so on looks like (and perhaps it works). It
might be overkill, but rather than reinvent the parsing code, the author
could probably have taken the relevant Tcl out of the original tkreminder
program and embedded it in the Perl script using the Tcl module off CPAN,
writing it out using something else existing like CPAN's Data::iCalendar
(this is the same format?) with no need to write any code other than
glue. Awk is a different thing altogether now, then, isn't it? But maybe
it would be more fun doing it all yourself in the more primitive tool. I
know people who'd rather mess with sed's hold spaces for the mental
challenge of it rather than use something more functionally complete for
the purpose.
--
Mike Small
sma...@panix.com