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 Andrzejek 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: *

  1. chazoid

    Failed in installing XML::LibXML

    I think Annihilannic is correct, I recently had a similar problem. XML::LibXML is an interface for libxml2, so it needs to be installed on your system first. see: http://www.xmlsoft.org/ I just type "xmllint --version" to see if it's been installed.
  2. chazoid

    conditional statements

    Thanks! I think the 9 query method should work fine. There's no need to make it too elegant. I'll probably never have to do this again I agree, the structure is flawed. Your suggestion makes much more sense. It's just that it's a system that's been in place for over 10 years, and they've been...
  3. chazoid

    conditional statements

    Hi all, I have a table with 9 fields that store email addresses: email1,email2,email3, etc. I need to add one new email address to several records. Since each record may have a different number of fields already filled, I need to put the new address in the next available field. This is the...
  4. chazoid

    How to write a switch statement in perl

    Just a caveat regarding Damian Conway's Switch.pm module - I wouldn't use it in production code or anything important. At work we had a large script that was using Switch.pm, and it started causing some bizarre problems when I was making some updates to the code. It took a while to figure out...
  5. chazoid

    Using Function Keys withing Perl Script

    AutoHotKey looks really cool.. I've already thought of a few uses for it. Thanks!
  6. chazoid

    Using Function Keys withing Perl Script

    I'll put in another vote for Win32::GuiTest, I've used it for automation and it seemed to be the best option. But... The application that you're controlling has to be brought to the foreground as if you were hitting F8 manually. (GuiTest can do this programatically) I had to use Win32::API to...
  7. chazoid

    perl -P option

    -P seems to be an old option from perl 4 - -P causes your script to be run through the C preprocessor before compilation by perl. (Since both comments and cpp directives begin with the # character, you should avoid starting comments with any words recognized by the C preprocessor such as...
  8. chazoid

    trying to read mail using net::pop3...sees message, but fails to read

    I would think you'd get the number of bytes in there if it succeeded in finding an email. You don't have anything in there that would cause the code to abort before the "message is bytes..." print statment. Try adding Debug => 1 to the constructor options per the documentation
  9. chazoid

    create page from csv

    I would suggest looking into the Text::CSV module http://search.cpan.org/~alancitt/Text-CSV-0.01/CSV.pm about your while loop.. your closing brace looks out of place :)
  10. chazoid

    Something is wrong with my Loop.

    when you use m//g, a position is set at the offset within the string where the first match is found. The next match starts searching where the last one left off. Just remove the g's see: perldoc perlop perldoc -f pos
  11. chazoid

    Sort a file

    you could do this with a hash of arrays or a hash of hashes. If duplicate values in the second column don't matter to you, I'd just use the hash of arrays method. It can be tricky getting the values out of the data structure. See perldoc perldsc for examples. The hash of hashes method will...
  12. chazoid

    error in opening of excel files using perl

    the script works for me whether I use a forward slash or backslash. I get the same error message if I enter a nonexistent filename. (I don't think the backslash acts as an escape when entered through stdin.) You do need chomp()'s on the other inputs like rharsh said. what do you see if you add...
  13. chazoid

    Regexp Help

    split() doesn't use regular expressions?
  14. chazoid

    Regexp Help

    you could do something like this unless speed is important. Using $` and $' tend to slow things down. # $` returns everything before the matched string. $' returns everything after the matched string. $string = "id <xx> MM blah blah"; if ($string =~ /\bMM\b/ ) { $before = $`; $after =...
  15. chazoid

    shift context......

    If this is outside of a subroutine, it's the same as: $opt_H = shift @ARGV unless ($opt_H); @ARGV is an array that contains the arguments that were passed to the script. So it's saying: unless $opt_H already contains a value, populate $opt_H with the first element of @ARGV if this is in a...
  16. chazoid

    Socket programming

    could you have the server launch the client with an SSH module, or am I also confused?
  17. chazoid

    Help with Perl script - parse file - rcp results

    No prob.. You should be able to just put it inside the while loop after you build $filename, or put it in a sub and pass $filename to it. To check your return codes, I think you have to bitshift the result - $return_code = $return_code >> 8; then something like: if ($return_code != 0) { print...
  18. chazoid

    Help with Perl script - parse file - rcp results

    you could use system() to run rcp - $return_code = system ("rcp -p $filename user@host:$filename");
  19. chazoid

    Any tips on automating FTP over SSL?

    http://search.cpan.org/~kral/Net-FTPSSL-0.04/FTPSSL.pm
  20. chazoid

    How to source a system file in perl

    Interesting... After much googling, I found this - http://tech.mahesha.com/2008/04/15/shell-built-in-commands-in-perl-script/ Hopefully that will work

Part and Inventory Search

Back
Top