Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
My regex foo is weak any help would be most appreciated# F full output my $F = `dir /q "$filename"`; my @lines = split /\n/, $F; # split output line by line # Owner line is on line 6 (Array element 5.) my $OL = $lines[5]; unless ( $lines[5] ) { return "UNKNOWN\\Windows"; } # The owner is the fourth word, my @words = split / +/, $OL; my $owner = $words[3]; # Return to the directory we were called from. $self->change_directory($currentdir); # Return the owner. return $owner;
2010-04-23 Retitled by GrandFather, as per Monastery guidelines
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to get filesystem ownerships
by SuicideJunkie (Vicar) on Apr 22, 2010 at 14:17 UTC | |
by Anonymous Monk on Apr 22, 2010 at 18:26 UTC | |
by afoken (Chancellor) on Apr 23, 2010 at 09:44 UTC | |
|
Re: How to get filesystem ownerships
by Marshall (Canon) on Apr 22, 2010 at 16:37 UTC | |
by Anonymous Monk on Apr 22, 2010 at 18:40 UTC | |
by Marshall (Canon) on Apr 22, 2010 at 20:56 UTC | |
by Anonymous Monk on Apr 24, 2010 at 17:28 UTC | |
by JSchmitz (Canon) on May 13, 2010 at 17:19 UTC | |
|
Re: How to get filesystem ownerships
by AR (Friar) on Apr 22, 2010 at 14:02 UTC | |
|
Re: How to get filesystem ownerships
by Anonymous Monk on Apr 22, 2010 at 14:18 UTC |