hector89 has asked for the wisdom of the Perl Monks concerning the following question:
i have written this code for looking .txt file through directories and subdirectories inside that passed directory but it's not working..anyone suggest why>?#!/usr/bin/perl use warnings; use strict; use File::Find; find(\&file_names, $ARGV[0]); sub file_names { if(-f $File::Find::name=~/.txt$/) { print "$File::Find::name\n"; my @files=$File::Find::name; } }
|
|---|