Noah wrote:
> 
> Hi there,
> 
> is there a way to easily just get the number itself saved into an array?
> i dont need the 'link' text.
> 
> if (@ARGV) {
>     @link_numbers = grep(/^link([0-9]+)/,@ARGV);
> }

Use the block form:

if (@ARGV) {
      @link_numbers = grep { /^link([0-9]+)/; $_ = $1; } @ARGV;
}

Doesn't work with "link0".


-- 
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

I like Perl; it's the only language where you can bless your
thingy.

Eliminate software piracy:  use only FLOSS.

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