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. makwise

    How to Grep array element substrings using Hash element patterns?

    Thank you all for your help. I really appreciate it. The following got me where I needed to be... foreach $an ( keys %GrepPatternHash ) { chomp($an); @GrepResults = grep (/$an/, @TargetList); Mark.
  2. makwise

    How to Grep array element substrings using Hash element patterns?

    Rather than posting the actual data at this time, how about this: filea contains... abc def ghi fileb contains... abc zabcd yza When my original script is run, it returns: abc With Kevin's suggested modification, grep (/$GrepPatternHash{$_}/, @TargetList); ...it returns... zabcd yza The...
  3. makwise

    How to Grep array element substrings using Hash element patterns?

    Thanks Kevin. I tried your suggestion and it returned inverse results to what I was getting, i.e. I got everything back except precise matches. It behaved as though I had specified ! like so: grep (! $GrepPatternHash{$_}, @TargetList); So, for kicks, I tried your suggestion again, but with...
  4. makwise

    How to Grep array element substrings using Hash element patterns?

    Hi. I'm new to perl, and not expert in any particular programming language. I've written a script that does the following: 1) Takes a list in FileA as input to a hash (%GrepPatternHash). 2) Takes a list in FileB as input to an array (@TargetList). 2) Uses the elements of that hash as the...

Part and Inventory Search

Back
Top