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 SkipVought 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. stanious

    Format Issue

    In the name of TMTOWTDI, here's another way (though I actually like Kevin's solution better). If for some reason you want the other text, like the author or the publisher, it's in @text. open FILE, "sample.txt"; my %list; while (<FILE>) { my @text; do { if ($_ =~ /[a-z]+/i) {...
  2. stanious

    File Parsing question....

    If you're using regexes, then you'll probably want to use $&. $& is the captured text from the most recent regex. Maybe something like this ... my $str = "class1:\n entry1: bumble.\""; if ($str =~ /entry1:(\s+|\t+)[a-z0-9_\.,:;\"]*/i) { $str = $&; }
  3. stanious

    Creati ng new HashArray from 2 existing Hashes

    Try it this way ... my %c; for (keys(%b)) { $c{$_} = $a{$b{$_}} unless !exists($a{$b{$_}}); } Hopefully this will make more sense. We want to map the keys of %b to the values of %a, but as Miller pointed out, we need to check that a given key (from the values of %b) exists in %a...

Part and Inventory Search

Back
Top