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 Mike Lewis 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. travs69

    Data Mapping with Hashes

    I should add there is probably cleaner way to do this, but this was quick and simple and I'm on 5 hours sleep :) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [noevil] Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong...
  2. travs69

    Data Mapping with Hashes

    Your region has is set up backwards, if you are storing "5" in your query hash, then you want your region hash to be 5 => Relay so you can then print, I only fixed that one for this example. use strict; my $data = "17 21 19 70 99 45 32 25 67 89 90 91 11 10 12 33 34 36 37"; my %region = ( 5...
  3. travs69

    Paypal IPN Script Stopped Working After 2 Years

    The problem is you are used to have a page file (or tmpfs if linux/unix) and that helps supplement your ram (or lack of). When you go to a VPS they disable page/tmpfs because they don't want people under buying ram and over utilizing the disk. You can run a basic linux box in 512M of ram but...
  4. travs69

    Paypal IPN Script Stopped Working After 2 Years

    I will say that either coloing your own server or getting a virtual private server is the way to go. You have to handle your own security and updates, but I prefer it that way. I had a VPS with burst.net for a few years (I think cost was $60 per year) and only moved it because I had my own...
  5. travs69

    move files to dedicated directory based on filename

    Assuming they are remote and you don't aren't running perl where they are stored locally? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [noevil] Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
  6. travs69

    Serach for txt files in a direcory and all subdirectories

    would it be easier to just use -exec and cp? But I guess I'm assuming he doesn't want to keep the sub directory structure and just dumps them all into new dir? Just a thought :) I have never used cpio and had to man it to see what -pd did so I could understand your solution...
  7. travs69

    Serach for txt files in a direcory and all subdirectories

    on Linux just use find ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [noevil] Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
  8. travs69

    Data parsing

    Thanks.. I was struggling with that one for a bit, I figured I could figure out a split that would pick up the word before the : and then everything up to the word before the next :, but it was just killing me.... your seems so simple :) Thanks!!! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
  9. travs69

    Data parsing

    id:2 name:test1 longname:test2 with space longname description:here is my description.id:10 name:test3 longname:test 4 long name description:a discription of test 5 I have data like above and I'd like to get it into a hash like %hash { 'id:2' => {name => test1 longname => test2 with space...
  10. travs69

    Net:::FTP interrupted

    I would also wrap the whole think in a alarm, and when the alarm hits you could issue your stopftp command. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [noevil] Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong...
  11. travs69

    Regex help

    Thank you! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [noevil] Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
  12. travs69

    Regex help

    I have a regex written like this and it works fine $data = '01:16:43.7'; ($cdr{dhour}, $cdr{dmin}, $cdr{dsec}, $cdr{dfsec}) = $data =~ /(.*):(.*):(.*)(\..*)/; print "H:$cdr{dhour}\n"; print "M:$cdr{dmin}\n"; print "S:$cdr{dsec}\n"; print "fs:$cdr{dfsec}\n"; output: H:01 M:16 S:43 fs:.7 but...
  13. travs69

    PCAP reader to mysql

    $log->read("/Dump/m1.pcap"); does not look like it is on your desktop. You will have to deal with the spaces in windows files name, I suggest just keeping in a directory with no no spaces c:/blah/m1.pcap and reading it in like that "c:/blah/m1.pcap"...
  14. travs69

    browser connection timing out

    You will also have problems when people click the stop button, or the browser crashes, or their connection has a hiccup. I suggest taking the form values and storing them somewhere and assign a job ID (epoch? auto increment in a db?) and a status. Then have a local job running (cron, daemon...
  15. travs69

    IO::File -> Filehandles -> Archive::Zip

    I should add I found this to be a very good solution for some of my problems. I am creating data in a file to bulk load into mysql, so I was reading a file, writing it to another file, reading that file into SQL. A lot of disk read/writes. I moved it to read a file, write to /dev/shm, and...
  16. travs69

    IO::File -> Filehandles -> Archive::Zip

    On Unix/Linux? You can use /dev/shm http://www.cyberciti.biz/tips/what-is-devshm-and-its-practical-usage.html Travis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [noevil] Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the...
  17. travs69

    How to write a switch statement in perl

    or you could do this which works for any number my %option = ( 2 => [a,b,c], 3 => [d,e,f]); my $isnum = '2'; for (@{$option{$isnum}}) { print "X:$_\n"; } if you really want switches http://perldoc.perl.org/Switch.html but I've never used them. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
  18. travs69

    How to write a switch statement in perl

    If you only have 2 options my @letters = $inum == 2 ? (a,b,c) : ( d,e,f) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [noevil] Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
  19. travs69

    perl code running out of 2 GB VM limit

    There are memory links related to par compiling and hashs/hash refs (I can't find where I read that at but I had the same problem). I ended up writing a wrapper program that calls my code (per pdf, kinda doing the same thing), and then all memory gets released back to the programs as the...
  20. travs69

    Perl - parsing Windows CSV files with embedded quoted CR+LF, CR, or LF

    Any reason you didn't just Text::CSV? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [noevil] Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;

Part and Inventory Search

Back
Top