in reply to Re^2: dir handle
in thread dir handle

Sure I can, but why?
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^4: dir handle
by Mjpaddy (Acolyte) on May 27, 2014 at 10:34 UTC
    because Path::Tiny doesn't work on my system i tried it with FIle::Copy

      Well, since we don't know what your system (OS) is, nor have your full code, that's an issue on which it's hard for us to offer any help.

      "doesn't work" is detail-free... but details are exactly what we need to do any better than WAG'ing.

      But for a pair of WAGs, are you sure Path::Tiny installed correctly? ...that you have the latest version?


      Questions containing the words "doesn't work" (or their moral equivalent) will usually get a downvote from me unless accompanied by:
      1. code
      2. verbatim error and/or warning messages
      3. a coherent explanation of what "doesn't work actually means.

      check Ln42!

        system : windows 7

        i search for file::tiny in ppm but not found

        my logic:

        open both dir and take list of filename in array so one contain 2 and other 3 then in for loop i run index of array to capture individual file and apply copy() from File::Copy but when i m using $test1$x one dir contain one less file so i got an err so my copy statement not executed.. please help....
        use strict; use warnings; use File::Copy; my @test1; my @test2; print "Enter the file path form where you want to copy file:\n"; chomp(my $path1 = <STDIN>); opendir DH, "$path1" || die "$!"; @test1 = readdir (DH); print "@test1\n"; print "Enter the file path form where you want to copy file:\n"; chomp(my $path2 = <STDIN>); opendir DH, "$path2" || die "$!"; @test2 = readdir (DH); print "@test2\n"; my $count = @test1; my $count2 = @test2; my $x = 0; for ($x = 0; $x<$count2; $x++) { if($test1[$x] ne $test2[$x]) { print "$test1[$x] : $test2[$x]\n"; # copy("$test1[$x]", "$path2") or warn "cannot copy $test1[$x]" +; # copy("$test2[$x]", "$path1")or warn "cannot copy $test2[$x]"; +; } }