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 dencom 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: jriggs420
  • Content: Threads
  • Order by date
  1. jriggs420

    array modification

    I think this question is best posed with an example: Here's a sample array: @array=qw( 11111 22222 33333 xxmeta xxdata ); There could be more, less, or no 'xx...', and the length of the array varies. Given that, how would I reference the last line in the array...
  2. jriggs420

    ls | vi shell script

    I've come up with a simple shell script that works, but I want to refine it a bit so maybe some others can use it. Basically, it allows to me open a file from certain directory regardless of my cwd: vi `ls /home/jriggs/dox/*"$*" `Lets me just enter last part of the file, and there it is. I...
  3. jriggs420

    append to .htaccess file

    I have a relatively small, but aggravating problem on my apache server. Some script kiddie somewhere keeps trying to telnet into my server with a very crude brute force prog. I see it in my auth.log file as Jul 24 14:17:03 localhost sshd[4506]: Illegal user amanda from 218.202.223.244 Jul 24...
  4. jriggs420

    search replace text in textbox

    I'm pretty new to C#. Currently I am trying to work with Microsoft's 2005 Visual C# express. Here's what I'm trying to accomplish: 1) Browse to a word doc on my Computer 2) Read .doc into a text box 3) Do some modifications to the contents 4) ftp revised text in .txt format to my server I am at...
  5. jriggs420

    Using Open File Dialog Box

    Hi All, I'm totally new to OO programming, well more precisely microsoft .net style syntax. I recently downloaded Visual c# express, I want to learn, but am having a difficult time getting started. Mainly I think I'm searching the wrong terms. My first goal is to open a word doc in my...
  6. jriggs420

    simple perl search routine

    I'm using a text file to hold some information about files, like a mini-database (I know, I know). I'm trying to write a little sub-routine that will let the user enter 1, 2, OR 3 terms, and will return results arranged by relevence. Like m/($term1 AND $term2 AND $term3) then m/($term1 AND...
  7. jriggs420

    Kill a script

    I'm looking for a way to kill a script on user input from the keyboard. I was originally trying to use a while loop, but that didn't really accomplish what I wanted (at least the the way I did it). Some folks over on the CB at perlmonks recommended using perl's fork function. I read the...
  8. jriggs420

    Script not showing created file

    I wasn't sure if I should post here, or in the cgi forums, but I think my problem is more perl than anything else. This script #!/usr/bin/perl use CGI qw(:standard); use Image::Magick; print header; print "<link rel=\"stylesheet\" "; print "type=\"text\/css\"...
  9. jriggs420

    Dealing with formatted array

    Hi All- I have the following code which is pretty straight forward, for getting data into a form the 'real' script can use. 7 while ($ln=<DATA>){if ($ln!~ /^\s*$/){ 8 $ln=~ s/(^[1-9])/\n$1/g; 9 push @goodat , $ln;} } This output looks as it should when I print...
  10. jriggs420

    CGI to upload a file

    It seems like most of my posts start this way but: Is it possible to use CGI to upload a file to my server? I'm trying to put an html page on my server that has a browse button, text box, and will allow someone (at this point I suppose anyone) to upload a file onto my server. I have physical...
  11. jriggs420

    ls with optional char

    Hi all, This works ls joe/home/*"$*"fine as a shell script. But how can I tell the shell to also return files which are optionally followed by a single letter, 'x' for example. I think using another wildcard will make this regex too greedy, TIA Because a thing seems difficult for you, do not...
  12. jriggs420

    Recommend A Video Card?

    Hi all! Hope I'm not posting on the wrong section: I'm looking to upgrade my video card for <$150. Here's some specs emachines t6410 3200+amd athlon 64 processor windoze xp homeBasically, I need I card that's going to last about a year or so. This box came with an ati express 200 (integrated...
  13. jriggs420

    Capture Text

    Hello World! I'm trying to capture the text that follows a set pattern. For example: ___DATA_____ User name=jriggs In this simple scenario I would like the script to search the text file until it finds the above line, and then set. $uname='jriggs'...Of course $uname won't always be 'jriggs'...
  14. jriggs420

    sorting an array

    I have this code 3 @alpha=("Names","Steve","Linus","Larry","Bill"); 4 @alpha=sort(@alpha); 5 foreach $name (@alpha){print $name."\n";} 6 #print @alpha; Suppose I only wanted to sort $alpha 1-4 (every line but the first one), how would I go about this? I'm looking...
  15. jriggs420

    Foreach regex

    Hello again, I have the following loop: 20 my $line; 21 foreach $line (@_){ do sth ; } Simple enough, but I can't figure out how to only set $line equal to strings that contain no text (blank whatever). I have tried the following conditions in various places within the loop with...
  16. jriggs420

    textarea format

    How can I check for blank lines in a textarea, and remove them? I am thinking that I will need to populate an array with the data from the textarea first. Ideally, I would like to be able to perform this before the data is submitted and do it automatically. Also, I would like to be able to...
  17. jriggs420

    \x92 x\93 chars

    Whenever I ftp a file into vi, I get these characters in the file. It's strange since copy/pasting doesn't show them, but rather the ' or " as appropriate. I would prefer to use ftp though, as it is much faster/cleaner. So my question is other than doing a bunch of s/x\\92/\'/;(which I have yet...
  18. jriggs420

    Use Javascript to create .txt file?

    Hi all. I'm not sure if this is even possible with javascript or not, but I thought I'd give it a shot...I am wanting to write a simple app that can be run locally on my computer. All I need it to do is take data from 3 seperate text boxes and join them together into a single dataset, then...
  19. jriggs420

    use Text::Wrap?

    I need to format a string of data, but I don't want to start each string w/ a new line (don't separate long string into a series of short strings). Basically I want the function of the module, only with a single string. I can't simply replace the /n char with // because this causes problems with...
  20. jriggs420

    Working with data chunks

    I have an app which requires 4 separate chunks of input data, with each dataset being separated by a series of special characters, i.e.111 or xxx or some such. I know how to split a string into separate variables, but since the datasets here will be considerably larger (10,000 chars), I have the...

Part and Inventory Search

Back
Top