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 SkipVought 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. laserBeam

    Sendmail Error

    your variable $to is not initialized to anything, also @test....add the pragma <use strict;> to your code to hint you about these things.
  2. laserBeam

    exec() and redirecting STDOUT/STDERR

    platform independent (-: I don't think Windows has a separate stream for Errors thought.... You can also try to use the IPC:Open3 module... It works fine on UNIX... use IPC::Open3; open3($in,$out,$err,"ls -l|"); close $in; @b=<$out>; @c=<$err>; print STDOUT "OUT:", @b, "\n\n\n"; print...
  3. laserBeam

    exec() and redirecting STDOUT/STDERR

    When using your command, you can just redirect STDERR to STDOUT to get them together. open( H_PROGRAM, "ls -l 2>&1 |");
  4. laserBeam

    Running make; make install on windows box

    nmake.EXE is correct if you have Visual Studio installed. I doubt that a dll extension would be a Perl module though.
  5. laserBeam

    Newbie Date Question

    If you are familiar with Unix date <format> , you can use the Date::Format module.... use Date::Format; print time2str("%c", time); Cheers
  6. laserBeam

    Net::Telnet::cisco and pattern matching problem.

    If your code works fine except when it returns nothing, just try to test if the variable is defined before doing your match.....I don't totally understand your snippet of code though but try this with the defined function. sub process_input { # # Code to process the information from the PIX...
  7. laserBeam

    Perl Question

    You can just call: system("run_this_perl_script.pl");
  8. laserBeam

    Puzzling word count after removing tags

    When you use the /g , the expression returns a list not a scalar value anymore since you can have multiple matches. { $line =~ s,<[/]?.*?>,,g; @a = ($line =~ m/\w+/g); $wc += scalar(@a); # or $wc += @a; } print "Word count: $wc\n"; or if you want to be very fancy ;-), you...
  9. laserBeam

    Backsubstitution in a variable?

    you can also play with the /e modifier.... my $source = "(\\d\\d)(\.\*)" ; my $dest = '"data $1"'; $_ = "35 example filename.fmn"; s/$source/$dest/ee; # print also data 35 print("$_\n"); #prints 'data'
  10. laserBeam

    Backsubstitution in a variable?

    You are doing the substitution a little too early :-) It only happens in-place between quotes when the variable is set. Therefore this should work. my $source = "(\\d\\d)(\.\*)" ; my $dest = "data"; $_ = "35 example filename.fmn"; s/$source/"$dest $1"/; # this work.... print("$_\n"); #prints...
  11. laserBeam

    Figuring out the regex problem

    Assuming the regex works.... Since He wants to count 1 occurrence of the match between _t3, you need to reset the $flag to 0 where you are incrementing. if ($flag) { ++$trans; $flag = 0; }
  12. laserBeam

    filehandle for a log file with many packages

    The way to solve your problem is to write a separate LOG package /object that you can pass the object reference to your diverse functions within your packages. Since I can't seem to fall asleep, I'll write it for you :-) to illustrate...... LOG.pm...
  13. laserBeam

    Why it is not counting the next directory?

    Must have been late :-) Please notice that you're passing $year to get_files as parameter and you're not using it. Although the get_files function seems to be an overkill for what you want to do. A simple solution: sub get_files { my $year = shift; my @dirs =...
  14. laserBeam

    Powerbuilder Xpediter

    At my last job, I used a cool software xtsql32.exe written in PowerBuilder I believe to access databases. Where can I find a download online or can someone get me a copy. I’ll appreciate the help. I just miss it a ton. Thanks!
  15. laserBeam

    Loan Management

    How do I code a loan management database program using visual basic?
  16. laserBeam

    Visual Basic OOP

    Can someone recommend a good book on OOP using Visual Basic? I'm taking a class in this subject and both the book and the teacher make no sense. Thanks, LaserBeam

Part and Inventory Search

Back
Top