After second thought
This line:

my @y = grep { $_ if ($_ =~ /\d+/)} @list;

could be simplified with this:

my @y = grep { /\d+/ } split(/\s+/,$file);

Since grep { $_ if /\d+/ } wouldn't match on 0, but grep /\d+/ would.

I'm still wondering how can I do that with "unpack" :-(

--
Regards,
Edward WIJAYA
SINGAPORE

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to