in reply to Re: Confusion with Unzip and GREP
in thread Confusion with Unzip and GREP
Poppycock!
#!perl use strict; use warnings; use 5.010; use Data::Dumper; my @list = qw[ Xindex r-index.txt Index.txt notIdx.txt ]; my @file = grep( /index/i , @list ); say Dumper( \@file ); __END__ $VAR1 = [ 'Xindex', 'QIndex', 'r-index.txt', 'Index.txt' ];
See Eliy's reply about grep-in-scalar-context.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Confusion with Unzip and GREP
by Anonymous Monk on Dec 11, 2014 at 10:52 UTC | |
|
Re^3: Confusion with Unzip and GREP
by Anonymous Monk on Dec 11, 2014 at 10:58 UTC | |
by Eily (Monsignor) on Dec 11, 2014 at 13:40 UTC |