Help for this page

Select Code to Download


  1. or download this
    use Path::Tiny qw/ path cwd /;
    my $dir = cwd(); 
    my( $first ) = @ARGV;
    # my @prfiles = grep { $_ eq $first } path( $dir )->children;
    my @prfiles = path('.')->children( qr/\Q$first\E/ );
    
  2. or download this
    use File::Find::Rule qw/ find rule /;
    my( $first ) = @ARGV;
    my @prfiles = find(file => name => $first, maxdepth => 1, in => '.');