Re: HTML::Tidy Filter for BBEdit?
I think HTML::Tidy doesn't offer what you're seeking: looks like it's a validation tool, not a "pretty-print" tool. So your output is empty if things are well in the world of your html, and warnings/errors if there are problems validating the string HTML::Tidy is fed. Well, yes and no. Perhaps it seems that way because you're seeing the HTML::Tidy documentation offering only to do those things. But having installed the tidy library on my Mac, I can type tidy test.html at the command line and have it give warnings and also print to STDOUT a fixed version of my file, e.g. it might say 'Missing attribute on line 6', and then it will print out a new version of the file with that attribute added. The option -i will do indenting, i.e. rudimentary formatting, and the -m option will edit the file in place rather than dump the corrected version out. So I still remain baffled by the module. Does its "clean" function transform a string in place? It doesn't seem to. Where are the options? Is it perhaps confused about where tidy is on my system (/opt/local/bin/tidy) ? "Have You Validated Your Code?" John Horner(+612 / 02) 9333 3488 Senior Developer, ABC Online http://www.abc.net.au/
Re: HTML::Tidy Filter for BBEdit?
In article <[EMAIL PROTECTED]>, Paul McCann <[EMAIL PROTECTED]> wrote: > Do the items in the "Markup->Tidy" submenu do what you're seeking? I'm > pretty sure they hook into a copy of HTML Tidy that's embedded in BBEdit. There is an HTML Tidy in BBEdit, but it only works on the whole document. The filter posted earlier works with the current selection, which I think was the point of the question. :) -- brian d foy, [EMAIL PROTECTED]
Re: stupid newbie question
On Jan 17, 2005, at 6:06 PM, John Delacour wrote: Apologies first of all for my original useless response. Here's how I would do it -- and it works. while (<>) { /Contig([0-9]+)/i and $hash=$1 and eval "my \%$hash"; /CR05-C1-102|CR05-C1-103/i and eval "\$$hash\{\$&\} += 1"; } A bit eval-y for my tastes. I'd translate that to: while (<>) { ($n) = /Contig([0-9]+)/i; /CR05-C1-102|CR05-C1-103/i and $data{$n}{$&}++; } and use a real two-level hash. -Ken
Problems Getting Modules from CPAN
All of sudden, I'm having this strange problem. I do this in terminal: sudo perl -MCPAN -e 'WWW::Restaurant::Menu' And . . . nothing happens. When I go into cpan, I get this message: There seems to be running another CPAN process (pid 606). Contacting... Other job not responding. Shall I overwrite the lockfile? (Y/N) [y] When I go into Activity Monitor I don't see pid 606. Last week it was working just fine for me. I'm puzzled as to what might be going on - any advice on getting this back up and running again? -- Lola - mailto:[EMAIL PROTECTED] http://www.lolajl.net | Blog at http://www.lolajl.net/blog/ Terrorism delenda est! (Terrorism must be destroyed utterly!) I'm in Bowie, MD, USA, halfway between DC and Annapolis.
Re: Problems Getting Modules from CPAN
Lola Lee said the following on 1/18/05 9:41 AM: All of sudden, I'm having this strange problem. I do this in terminal: sudo perl -MCPAN -e 'WWW::Restaurant::Menu' And . . . nothing happens. When I go into cpan, I get this message: Moral of the story . . . pay attention to the words. Seems I left out this vital word "install". Doh . . . correcting the entry in the NoteTaker file I keep for Perl info . . . -- Lola - mailto:[EMAIL PROTECTED] http://www.lolajl.net | Blog at http://www.lolajl.net/blog/ Terrorism delenda est! (Terrorism must be destroyed utterly!) I'm in Bowie, MD, USA, halfway between DC and Annapolis.