in reply to Confusion with Unzip and GREP
Well, I get an "1" . I think it's because "grep" returns an array. Did you tried something like "$filename[0]"? This returns correctly the file name "index.txt". I dunno why yesterday it worked...maybe some editing? Hope you help.opendir D, "/tmp" or die "could not open dir: $!\n"; my @filename = grep(/index/i, readdir D); print @filename;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Confusion with Unzip and GREP
by Anonymous Monk on Dec 11, 2014 at 10:49 UTC | |
by Anonymous Monk on Dec 11, 2014 at 10:52 UTC | |
by Anonymous Monk on Dec 11, 2014 at 10:58 UTC | |
by Eily (Monsignor) on Dec 11, 2014 at 13:40 UTC |