Hey Angus,
I rewrote dottie using HTML::Parser and HTML::TableContentParser.
It's not done of course, but the basic functionality is there. Whadaya think?
printf
"[%s]\n".
"Address=%s\n".
"Port=%s\n".
"ConnectionType=%s\n\n",
(defined $dup ? sprintf "%s %s", $bbs, $dup++ : $bbs),
# Need to add code here to NOT print "Port" if it's "serial"
@{$_};
Angus McLeod wrote to Delbert <=-
Re: dottie v0.01
By: Delbert to Angus Mcleod on Wed Oct 10 2007 07:12:00
Hey Angus,
I rewrote dottie using HTML::Parser and HTML::TableContentParser.
It's not done of course, but the basic functionality is there. Whadaya think?
Not tried it but it looks good.
printf
"[%s]\n".
"Address=%s\n".
"Port=%s\n".
"ConnectionType=%s\n\n",
(defined $dup ? sprintf "%s %s", $bbs, $dup++ : $bbs),
# Need to add code here to NOT print "Port" if it's "serial"
@{$_};
Separate printf()s so the Port can be optional? Or construct $format
on the fly, leaving out Port=%s\n if port is 'serial', and finally
doing a single printf $format with or without a Port argument?
Separate printf()s so the Port can be optional? Or construct $format on the fly, leaving out Port=%s\n if port is 'serial', and finally doing a single printf $format with or without a Port argument?
I think a separate printing function so format can be adjustable from
the command line.
The other thing is where to do the dup mangling. I really think it
should be part of the sort function so that dup or no_dup can be
selectable at that point in the program.
But if that's the case, I'm not sure about loading up an array like @keynames at that point because the names in the hash have to be
mangled as well to be able to call them out later by name.
Or do we just make a new hash AND a new names array at that point while looping through them to get the sort done?
Angus McLeod wrote to Delbert <=-
Re: Re: dottie v0.01
By: Delbert to Angus McLeod on Wed Oct 10 2007 21:06:00
Separate printf()s so the Port can be optional? Or construct $format on the fly, leaving out Port=%s\n if port is 'serial', and finally doing a single printf $format with or without a Port argument?
I think a separate printing function so format can be adjustable from
the command line.
Or maybe something with 'format STDOUT', etc?
That is why I'd prefer to do the mangling *after* the sorting.
Or do we just make a new hash AND a new names array at that point while looping through them to get the sort done?
You could do that -- take the collected data and build a rationalized structure representing the data as you wish to print it. But I'd
rather not go that road if it can be avoided.
Angus McLeod wrote to Delbert <=-
Or do we just make a new hash AND a new names array at that point while looping through them to get the sort done?
You could do that -- take the collected data and build a rationalized structure representing the data as you wish to print it. But I'd rather not go that road if it can be avoided.
Or maybe something with 'format STDOUT', etc?
I might understand what you mean here with a bit more study. ;)
You could do that -- take the collected data and build a rationalize structure representing the data as you wish to print it. But I'd rather not go that road if it can be avoided.
Is this more what you were getting at?
print_it(my @keylist = sort_it(%bbs_list));
# ^^^^^^^^^
# Sending in whole global hash for now
# but could be a presort filter
But let me say, you seem to be spending a lot of time on a program that already does what it needs to!
Sysop: | MCMLXXIX |
---|---|
Location: | Prospect, CT |
Users: | 325 |
Nodes: | 10 (0 / 10) |
Uptime: | 129:22:11 |
Calls: | 500 |
Calls today: | 1 |
Messages: | 218423 |