in reply to Transversing thru dir using regex rather than a absolute path

You are probably thinking of glob constructs, which are different to regular expressions. In your example D:/Settings/* (not sure why you used //), "*" in globbing means a filename consisting of "zero or more of any valid character", whereas in a regular expression that would be ".*". The "*" is a quantifier, it quantifies the character, or group of characters, to its left. The dot "." in regular expressions mean one single character, whereas in globbing that would be "?".

  • Comment on Re: Transversing thru dir using regex rather than a absolute path

Replies are listed 'Best First'.
Re^2: Transversing thru dir using regex rather than a absolute path
by perlprint (Initiate) on Apr 12, 2010 at 09:58 UTC
    $val="D:\\VmWare\\*"; find(\&print_name, "$val"); sub print_name { push(@array_name,$File::Find::name); } foreach $val(@array_name) { print "$val \n"; }

    actually i have more paths where u have * in middle of the path also.The output of above is giving as empty