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 strongm 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 polka4ever

  1. polka4ever

    how to say, zip code Starts With

    Thank you much for the tips! This worked great. So, once again coming from the SQL point of view - what if i have SEVERAL zip codes that i'm looking for? what if i want to say, If $ZipPlus4 has a value in ('29626', '29627', '29628', '29788') then increment $n += 1, and if it's NOT in those...
  2. polka4ever

    how to say, zip code Starts With

    hello, I am more of an SQL person - so what I am trying to say, I am not sure how to say in Perl. I am sure it is some sort of regular expression. Maybe YOU can help me! I would like to say, if ($ZipPlus4 STARTS WITH 29626) then increment n. any hints? thank you!
  3. polka4ever

    understanding Hashes

    thank you Ishnid :-) very helpful and useful.
  4. polka4ever

    understanding Hashes

    thank you for the info! another question - do you find that you use Hashes often in your perl programming? I am understanding the concept as it's presented in the book - but not sure how i will apply it in-real-life.
  5. polka4ever

    understanding Hashes

    Hello! I am new to Perl and have been using it intermittently in a QA role. Mainly for parsing & testing tab delimited files. I am reading through the Learning Perl book & working through Chapter 5 right now which is a chapter on hashes. I am not sure I'm understanding a Hash on the large...
  6. polka4ever

    break out STDIN into single letters

    nice! thanks rharsh for the tip! any thoughts on how to break it up into groups of 5, putting a space in-between?
  7. polka4ever

    break out STDIN into single letters

    i just tried Cygwin, but i still can't copy and paste from the screen ... whats up with that?
  8. polka4ever

    break out STDIN into single letters

    HEY! can i ask another question? So i wrote out an decoder and an encoder. But with the encoder - i want the blocks to be spaced in groups of 5. So if i wanted to say "I wrote a perl to encode and decode" - the program would return this to me: KN4H5 CQ9C4 S5HCO 8HFCQ OFFC8 HFC instead of this...
  9. polka4ever

    break out STDIN into single letters

    holy crap! that *IS* simple :-) thanks Trojan and sorry for the scare ;-)
  10. polka4ever

    break out STDIN into single letters

    Hello! thank you so much for the valuable input. Forgive the slowness of my brain - this is not something I particularly EXCEL at (at least not yet - let's hope that changes). I *would* use the "tr" option - but it's only mentioned very briefly in 'Learning Perl' and I'm not sure I can really...
  11. polka4ever

    break out STDIN into single letters

    Hello, I am new to perl and working my way through the Learning Perl book. I'm only on page 37, so bear with me!!! I want to take STDIN and break it into letters. It's a decoder program. Like, for example, if someone types in: LC8Q4 CBDSN XQRHD NKJXB HR into STDIN ... it will come out as BECAR...
  12. polka4ever

    pull only rows where field 2 is 'WI' in tab-delimited file

    I bet it is very similar to what was posted for kre1973 ... except that I need the "WI" or "OR" or "NE" or whatever state I need to occur in field 2 - instead of, say, the last name field or something.
  13. polka4ever

    pull only rows where field 2 is 'WI' in tab-delimited file

    hello! I have a story problem for you. I have a tab-delimited file. The 2nd field is the "state" field, and I want to pull out of this file, and write to a NEW file, only the rows that have Wisconsin as their state. 'WI' I believe I need to use "split" but not sure how. This is how far I've...
  14. polka4ever

    Putting "awk" inside of perl, system `cmd`

    Thank you! Yes, I had posted something very similar & was still not able to do what I wanted, but this time I *believe* i've got it. I needed to "split", which I wasn't doing - so thank you for that hint. system "rm seq2"; $ps=`ps -ef | grep java`; print "$ps"; @pid=split /\s+/, "$ps"; print...
  15. polka4ever

    Putting "awk" inside of perl, system `cmd`

    hello, does perl allow/understand when i use AWK inside of a system command? I can't understand why this isn't working: $pid=`ps -ef | grep java | egrep -v grep | awk '{print $2}'`; print "$pid"; when i type: ps -ef | grep java | egrep -v grep | awk '{print $2}' at the command prompt itself...

Part and Inventory Search

Back
Top