in reply to Re: Unsuccessful stat on file test
in thread Unsuccessful stat on file test
#!/usr/bin/perl use warnings; use strict; sub filetest { my @answer; return "File does not exist\n"; unless -e $_; push @answer, "readable " if -r $_; push @answer, "writable " if -w $_; push @answer, "executable " if -x $_; return @answer; } while (<>) { s/\s*$//; my @answer = &filetest($_); print @answer; }
the program executes quietly, not printing out any messages. I'm a little confused and befuddled by this.return "File does not exist\n"; unless -e $_;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Unsuccessful stat on file test
by Corion (Patriarch) on Mar 02, 2008 at 20:07 UTC | |
|
Re^3: Unsuccessful stat on file test
by stiller (Friar) on Mar 02, 2008 at 20:16 UTC | |
by bluethundr (Pilgrim) on Mar 03, 2008 at 05:06 UTC | |
|
Re^3: Unsuccessful stat on file test
by jwkrahn (Abbot) on Mar 02, 2008 at 21:00 UTC |