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.
In reply to Re^2: Confusion with Unzip and GREP
by Anonymous Monk
in thread Confusion with Unzip and GREP
by sriram_perl_diver
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |