in reply to Re: Syntax Error deleting files and folders in a directory
in thread Syntax Error deleting files and folders in a directory

You missed one...

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Replies are listed 'Best First'.
Re^3: Syntax Error deleting files and folders in a directory
by NetWallah (Canon) on Dec 28, 2013 at 20:05 UTC
    Aah - yes - I had not read that file down ... thanks.

    Also - these (completely incorrect) loops:

    FILE: while (my$file = @files) { for my $kp (@KEEP) { next FILE if $file eq $kp; } rmtree($deletes); } return; }
    can be written in a more perlishly as :
    my %keepers = map {$_=>1} @KEEP ; # OR declare %KEEP instead of @KEEP rmtree ([grep {not $keepers{$_} }@files]);
    (untested).

    You probably need to chomp(@files) too, before this operation.

    File::Path documentation prefers remove_tree over the legacy rmtree.

            If your eyes hurt after you drink coffee, you have to take the spoon out of the cup.
                  -Norm Crosby

      Well, now I have much to think about. I will repost in a couple of days once I scour my Programming Perl manual.

Re^3: Syntax Error deleting files and folders in a directory
by smturner1 (Sexton) on Dec 30, 2013 at 04:25 UTC

    Thank you Tobyinc