Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: SparceMatrix
  • Order by date
  1. SparceMatrix

    HTML to Text with PERL. Is it possible?

    Well, after all this, I finally managed to bump into some information in my PERL CD Bookshelf 4.0. Those who have it might try looking in "The PERL Cookbook" Section 20.5.1, So, FormatText would do the job, I bet. Unfortunately, I've tried searching for it and I can't find the module. After...
  2. SparceMatrix

    HTML::Parser parsing details, example: <OL>. Simple code included

    I'm glad to hear somebody besides me muttering to myself say that.
  3. SparceMatrix

    HTML::Parser parsing details, example: <OL>. Simple code included

    Thanks, all. The documentation at CPAN looks the same as the stuff I got with ActiveState's distribution. I think I have some basic gaps in understanding the use of reference/dereference variables. The idea of a "handler" seems to be another module based device that I can find no...
  4. SparceMatrix

    HTML::Parser parsing details, example: <OL>. Simple code included

    Great! Thank you. That works like a charm. In case anyone missed that, here are the changes to the above code, use strict; use HTML::Parser; my $file = 'index.html'; my $parser = HTML::Parser->new( text_h => [ \&text_handler,"self,dtext"], start_document_h =>...
  5. SparceMatrix

    HTML::Parser parsing details, example: <OL>. Simple code included

    OK, I tried that. I just added those two lines to the above code and got, $VAR1 = bless( { '_hparser_xs_state' => \25350180, '_private' => { 'text' => [ ' '...
  6. SparceMatrix

    HTML::Parser parsing details, example: <OL>. Simple code included

    I originally started applying this module to solve a problem I posed here, http://www.tek-tips.com/viewthread.cfm?qid=1220558, "HTML to Text with PERL. Is it possible?" I got some good code and some good advice, but I am having a new problem right away. Here is the basic code again, use...
  7. SparceMatrix

    HTML to Text with PERL. Is it possible?

    Thank you. Yes, of course. But since I am completely clueless about the rest of "... @{$parser->{_private}->{text}};", I thought there might be some other way of accessing the results as a string native to the module. I should have mentioned the obvious "join" of the array.
  8. SparceMatrix

    HTML to Text with PERL. Is it possible?

    As I posted above, I have been able to successful demonstrate this code also offered above using a file: use strict; use HTML::Parser; my $file = 'index.html'; my $parser = HTML::Parser->new( text_h => [ \&text_handler,"self,dtext"], start_document_h => [\&init...
  9. SparceMatrix

    Regular Expressions as variables. Simple code included

    Well, to be precise, this code is being put to practical purposes. The example is an exercise. But I haven't the slightest idea what you are talking about when you refer to "caching" in the above code. It is enough for my purposes that the code works at all. Thanks again.
  10. SparceMatrix

    Regular Expressions as variables. Simple code included

    Thanks for that solution. It works for me too. Here is the source of my confusion regarding the delimiters. I misread this. The second delimited group is always interpreted differently than the first and if the /e modifier is used than the second part is interpreted as script irregardless of...
  11. SparceMatrix

    Regular Expressions as variables. Simple code included

    Isn't it true that the use of "{}" brackets mean that the second part of the s{}{} is actually interpreted as PERL code? how does that effect your solution? I'll try this tomorrow and get back.
  12. SparceMatrix

    Regular Expressions as variables. Simple code included

    I am trying to apply arrays in creating sequences of global Search and Replace Regular Expressions. I have the PERL Bookshelf CD 4.0 and have looked at the discussion in Chapter 7 on using the "qr// operator. But I have yet to apply a successful strategy using the substitution method I...
  13. SparceMatrix

    Can I process another file as HTML from JavaScript?

    Oh, well. Thanks for the code though.
  14. SparceMatrix

    Can I process another file as HTML from JavaScript?

    That's great! But save me a few more minutes and tell me if I could search any other page with the same code. I'm not exactly clear what the "document referrer" is and what is supposed to happen with the highlightGoodleSearchTerms function. I tried it with the default value and nothing happened.
  15. SparceMatrix

    Can I process another file as HTML from JavaScript?

    I've come up against this problem several times now. I tried dealing with it with PHP, but it appears my commercial host has disabled classes so that I can't use the DOM class ("disabled_classes -- no value" in my phpinfo()). I need to load an HTML file to search the text and highlight found...
  16. SparceMatrix

    Can Javascript access the same GET and POST values that PHP can?

    Could have and did before I posted, actually. Thanks, I don't need that kind of advice. What else is an associative array but a name field and a value so that the string, ?Name1=var1&Name2=vara+varb+varc&Name3=var3 ... becomes, SearchArray["Name1"]["var1"] SearchArray["Name2"]["vara varb...
  17. SparceMatrix

    Can Javascript access the same GET and POST values that PHP can?

    Well, I see that "window.location.search" will get me my query string like this, ?Name1=var1&Name2=vara+varb+varc&Name3=var3 ... But am I obliged to parse everything out myself? It seems like there is a natural associative array there. Is there no object that has this already done for me?
  18. SparceMatrix

    Can Javascript access the same GET and POST values that PHP can?

    OK, right out of my little O'Reilly pocket reference, Location is an object and refers me also to Link where there looks like there is a bunch of stuff to work with. Thanks! I'll be back to summarize how I managed.
  19. SparceMatrix

    Can Javascript access the same GET and POST values that PHP can?

    OK, so it's possible. Is it "document.URL" that needs to be read?
  20. SparceMatrix

    Can Javascript access the same GET and POST values that PHP can?

    I need to retrieve the GET (and/or POST) values that are submitted from a form on one page in a Javascript running on the loaded targeted page. Can Javascript access those values? I've a lot experience doing this with PHP, but of course Javascript is client scripting. Do I have to parse out...

Part and Inventory Search

Back
Top