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!

Search results for query: *

  1. merc58

    passing values to subroutine

    How do I input array values from <STDIN> is my approach right?
  2. merc58

    passing values to subroutine

    Can someone please tell me what I'm doing wrong. I'm trying to use three subroutines in one lib file to calculate total, average and extend the array by adding new values from previous values divided by 2 -------------------------------------------------------------- #! /usr/bin/perl require...
  3. merc58

    matching IP address string

    I want to match an IP address in a string and store in a variable thus :- $string = "192.168.2.1"; while (<STDIN>) { $_ = /\d{1,3}\.{3}\d{1,3}/; $ip = $1; } is this correct?
  4. merc58

    Pattern matching

    I have an array @field = ("A H","2 H","8 S","K S",...,"Q S"); I print the top 5 elements thus - for $k (0..4) { print $field[$k]; print "\n"; then for each of the first 5 element, do a pattern match. If the first element is "K S", match "S" with SAM, for "A H" match "H" with HENRY ...

Part and Inventory Search

Back
Top