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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by netman4u

  1. netman4u

    Simple substitution not working

    I don't understand this. I have a text file I am trying to do a substitution for that is not working: #!/usr/bin/perl my $out_file = "/etc/default/ovpa"; open (OUT, "$out_file") or die ("Error opening ovpa file $1"); while(<OUT>) { chomp; s/MWA_PROTOCOL/IT WORKED/g; } Here is the file...
  2. netman4u

    Net::FTP, print debug output to a handle

    Hello all, I have a program that basically does an FTP get of a file from a server, deletes some stuff from the file and then does an FTP put to another server. My script is working correctly but I would like to be able to print the FTP debug output to a logfile. Here is one of the FTP...
  3. netman4u

    Net::FTP put hanging

    Thanks Travis. That was the problem. If at first you don't succeed, don't try skydiving.
  4. netman4u

    Net::FTP put hanging

    Hello all, I have a script that uses the Net::FTP module to do some gets and puts. The gets are working fine but the puts are hanging. Here is the debug output: FTP Debug output: Net::FTP=GLOB(0x403fdb54)<<< 220 Microsoft FTP Service Net::FTP=GLOB(0x403fdb54)>>> user massmutual\weblog...
  5. netman4u

    Code not working, but it should!

    Your right ishnid. I had it right the first time. The way I read it: next unless EWSRDBUD contains EW; #correct next unless EW contains EWSRDBUD; # does not work Thanks for all the help all! The trailing spaces were the problem: use strict; open (PREFIX...
  6. netman4u

    Code not working, but it should!

    BTW, here is the relevant portion of the PREFIX file: DSP E00 E81 EAD EBI EBU ECA ECB ECE ECL ECR ECS ED EF EIS ELC ELS EPA ET ETA ETB ETC ETD ETE ETJ ETO ETS ETW EW FCA If at first you don't...
  7. netman4u

    Code not working, but it should!

    Hello all, Below is a snippet of code I am working on. use strict; open (PREFIX, "/home/mt71124/scripts/tws_prefix.txt") or die ("Error opening prefix file: $?"); my ($cpu, $sched_name, $job_name ) = @ARGV; my $count = scalar(@ARGV); chomp ($cpu,$sched_name,$job_name); my $prefix; print...
  8. netman4u

    Problem with simple script

    <slaps self on head> That was it! How did I miss that! Thanks elgra. Star for you! If at first you don't succeed, don't try skydiving.
  9. netman4u

    Problem with simple script

    Thanks for the reply, but I am getting the same thing. If at first you don't succeed, don't try skydiving.
  10. netman4u

    Problem with simple script

    Hello all, I am trying to get a script to work that I did not write. It looks like it should be working: #________________________________________________________________________ # Program: CPU3_check # # This script checks the CPU utilization of a system against # a predetermined threshold...
  11. netman4u

    Need help with regex

    Your right Kevin. Interesting I haven't done any perl in a year or so and I look at some of the scripts I wrote when I was doing some serious programming and I wonder how the hell I wrote those complicated 1000 line scripts and I relaize I didn't write them, you experts did one sub routine at a...
  12. netman4u

    Need help with regex

    Thanks ishnid that did it. Final code below: use strict; use warnings; my $prefix = shift @ARGV; my $cpu = shift @ARGV; my $sched_name = shift @ARGV; my $job_name = shift @ARGV; chomp ($prefix,$cpu,$sched_name,$job_name); open (CFG, "/home/mt71124/scripts/maestro_inst.txt") or die ("Error...
  13. netman4u

    Need help with regex

    Thanks ishnid. Your reply got me a little farther. After mucking with the code for a while I have it to the point where it reads the first line at least. Here is the new code: use strict; use warnings; my $prefix = shift @ARGV; my $cpu = shift @ARGV; my $sched_name = shift @ARGV; my...
  14. netman4u

    Need help with regex

    Thanks for the reply spookie but after changing the line to your code it prints nothing, not even the "These" If at first you don't succeed, don't try skydiving.
  15. netman4u

    Need help with regex

    Hello all, I have a script I am working on that looks to me like it should be working but it does not. It takes 4 variables from the command line, opens up a config file and compares the command line args against the config file: use strict; use warnings; my $prefix = shift @ARGV; my $cpu...

Part and Inventory Search

Back
Top