>>>>> "N" == Noah  <noah-l...@enabled.com> writes:

  N> Hi there,

  N> is there a way to easily just get the number itself saved into an
  N> array? i dont need the 'link' text.

  N> if (@ARGV) {
  N>     @link_numbers = grep(/^link([0-9]+)/,@ARGV);
  N> }

just change grep to map and it should work. grep only returns a subset
of its input list. map returns any list it generates given an input
list. in the above code the regex in list mode will return the grabbed
numbers and that is returned by map.

uri

-- 
Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to