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 bkrike 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 TomThumbKOP

  1. TomThumbKOP

    Adding a comma to the end of each line

    I believe in the above sample, you would need to chomp the $_ firat or you would end up with a comma on its own line. I would do it this way: open (IN, $file); open (OUT, >$temp); while (<IN>) { s/\n/,\n/; print OUT; } close (IN); close(OUT); unlink ($file); rename ($temp, $file);
  2. TomThumbKOP

    using system() then awk

    Is there some reason you must use AWK? If not, there are several existing modules that will let you ping and capture the error.
  3. TomThumbKOP

    Open Source IDE

    Has anyone used SharpDevelop (http://www.icsharpcode.net/OpenSource/SD/) and if so what is your opinion on it?
  4. TomThumbKOP

    Anyone used visual perl? (activestate)

    I am partial to SpecTcl. It will design GUIs in perl. It is still experimental, but it works. You can find it at http://spectcl.sourceforge.net/
  5. TomThumbKOP

    standard input of batch file

    If I understand, you need to send keystrokes to STDIN. There is no way that I am aware of to do this through a batch.
  6. TomThumbKOP

    How can I transform a file to the folowing kind!? Problem.

    If your text is always lower case, then you can get the ASCII value for each letter and subtract 111.
  7. TomThumbKOP

    Replacing batch files with PERL

    To shell out system commands, there are two options: 1) Use the system keyword. ex: system (&quot;command&quot;); 2) Use backticks (`). ex: `command`; As for file compare, there are several perl modules for file comparison. What specifically do you use FC for?
  8. TomThumbKOP

    passing arrays instead of FILES to sub-routines

    when using my $numberoflines = @array; it is not necessary to call the sub you use. To give a more complete view, this code should do what you want: use strict; use warnings; open (DATABASE, &quot;$database&quot;); my @db = <DATABASE>; my $number = @db; Assigning an array to a scalar (my...
  9. TomThumbKOP

    Beware Newbie Q: Quick script to search and replace.

    The easiest way IMO is the write out to a temp file then destroy the old file and rename the temp.
  10. TomThumbKOP

    Drive Letters

    Does anyone know of a way to programatically change drive letters? Preferably with vbs/wmi. I have found a registry hack, but it is a devil to get to work right and leaves me feeling somehow soiled .
  11. TomThumbKOP

    Simple Disk Usage Question HELLLPP&gt;.

    What does the code for det_dir_name() look like?
  12. TomThumbKOP

    Jumper Question

    MS should be Master CA should be Slave CS should be Cable Select
  13. TomThumbKOP

    is it possible to emulate keyboard strokes

    If your perl install was from activestate, then you should have ppm. If this is the case, you can: 1) Open a command prompt 2) type ppm <return> 3) type install Win32-GuiTest <return> This should install the package for you. Else, you can do it through CPAN, but it is more involved.
  14. TomThumbKOP

    push @array value to $var

    I will explain it to the best of my ability: use strict; my @array = ('1','2','3','blue','red'); my $array_reference = \@array; # a reference to the array -- After the line above, $array_reference will hold a scalar value that points to the location of @array in memory...
  15. TomThumbKOP

    push @array value to $var

    use join $c = join '', @a;

Part and Inventory Search

Back
Top