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 strongm 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: awingnut
  • Order by date
  1. awingnut

    Array Range Problem

    Ah, thanks. It gets a little confusing, to this beginner, understand when $ and @ are to be used with array references.
  2. awingnut

    Array Range Problem

    I may have made an error in observation. It appears now that the value of $#name doesn't matter. It just doesn't like me to use it in the range.
  3. awingnut

    Array Range Problem

    I have a foreach loop that operates on the elements of an array. However, the size of the array is variable. Here is the code segment: if ($#name>1) { . . . foreach my $part ($name[2..$#name]) { . . . Occasionally $#name will evaluate to 2. That seems to be...
  4. awingnut

    Challange the experts on string handling

    Duh! Sorry. I completely missed that. Thanks.
  5. awingnut

    Challange the experts on string handling

    Once again, thanks for your help. I pretty much copied and pasted what you proposed. Here is the code segment in question: my $string="NOV 1939"; ($date,$place)=$string=~/(.*?\d{4}) ?(?:,(.+)$)?/; print length($date)," - ",length($place),"\n";
  6. awingnut

    LWP and parsing a URL

    Thanks. Not very satisfying but at least I was right in my understanding of the problem. You are correct, it will require a lot of complex code to try and cover as many bases as possible.
  7. awingnut

    Challange the experts on string handling

    Sorry but I'm having a problem in the case where there is no location part. It seems that any time I try to use $location, I get an error saying it is uninitialized. How do I handle that to avoid the error? TIA.
  8. awingnut

    LWP and parsing a URL

    In this case the relative links start with ../blah/blah. What is not clear is how much of the full URL I need to store. For example: http://www.domain.com/dir1/dir2/dir3/page.html On that page is the URL: ../dir3a/another.html Then suppose the URL is: ../../dir2a/third.html Is it legal to...
  9. awingnut

    LWP and parsing a URL

    I need to follow some links using LWP (simple). However, some of the links are relative. Does anyone have an easy way to parse a relative URL to complete it? TIA.
  10. awingnut

    Challange the experts on string handling

    Make that 2 stars.
  11. awingnut

    Challange the experts on string handling

    It sure does and thanks for that explaintion. Much clearer then reading the regexp docs. A star for you. :-)
  12. awingnut

    Challange the experts on string handling

    That is great. Thanks for taking the time. I think one thing that confused me is the '.'. I thought that meant at least 1 character but maybe the following '?' fixes that. The trailing '?' means that it is an optional substring? So what is the difference between '.*?' and just '*'? The '?:' is...
  13. awingnut

    Challange the experts on string handling

    Thanks. Let me understand this a little before I try it. First is it not clear (I'm not a perl expert) how the regexp knows what to work on. I guess it is a special featur of the for loop but I'll need it to work on a variable. Anyway, let me test my meager regexp knowledge: '.*' means 1...
  14. awingnut

    Challange the experts on string handling

    I have been racking my brain to come up with an efficient way to parse a string. I am hoping those more experienced then me can come up with something. I suspect a regexp is the answer if I can come up with the right template but I am not a regexp expert. I need to parse a string that contains...
  15. awingnut

    Recursion advice

    Thanks for the reply. I'm not too worried about the termination condition. I've written plenty of recursive applications (mostly C) but never with perl. I'm writing an HTML to GED conversion application. Since I want it to go up and down the branches, recursion seems the easiest way to go.
  16. awingnut

    Recursion advice

    I am about to attempt my first recursive application. While researching it there seems to be some caveats with respect to recursion in perl. Does anyone have any general advice about common gotchas with perl recursion? TIA.
  17. awingnut

    Need help cleaning up inherited script

    You know what happens when you assume. :-) I am running OS X. However, I think Apple provides their version of Unix file systems with case sensitivity turned off. That would mean your analysis is still applicable and likely explains the error. Thanks.
  18. awingnut

    Need help cleaning up inherited script

    Thanks. That was it. It just took another pair of eyes. I never noticed that. Now for the tough question. Why did that cause those errors rather then some kind of missing library error? TIA.
  19. awingnut

    Need help cleaning up inherited script

    I have a working script but it produces some warnings. In the interest of cleaning it up and learning a little more about perl, could someone advise me what is causing the errors? Here is the script: [COLOR=green] #!/usr/bin/perl -w use Strict; use Net::POP3; use Authen::Krb5; use Authen::SASL...
  20. awingnut

    novice needs help with file I/O

    Got it! I was right, my 'while' test was not testing for 'undef' it was 'undef'ing the variable. Since 'defined' is NOT a funtion, I changed my test from '! undef' to 'defined' and it works. Thanks anyway.

Part and Inventory Search

Back
Top