Would returning the array of status be sufficient?
@foo = chmod 755, "bar", "baz", "quux";
# @foo == (0, 2, 0);
How to convert them to error messages would be a challenge.
Unless passing them through $! would do the trick.
Hmm, perl -wle '$!=3; print $!'
No such process
Yup,
My worry is that it seems like this would return
an empty list on success, so:
@foo = chmod 755, "bar", "baz", "quux"
or die "Whoops, died on success!";
This seems to me to go contrary to the way perl tends to work... are
there any other functions (beside system) that
At 06:40 AM 8/30/00 -0600, Tom Christiansen wrote:
My worry is that it seems like this would return
an empty list on success, so:
@foo = chmod 755, "bar", "baz", "quux"
or die "Whoops, died on success!";
This seems to me to go contrary to the way perl tends to
At 03:35 PM 8/30/00 -0600, Tom Christiansen wrote:
=head2 Hash Context
When the result is assigned to a hash, the list returned could be the names
of the unsuccessfully modified files and their corresponding C$! errors.
Um, but we don't have hash context. :-(
We will :-)
RFC 21:
=item
This and other RFCs are available on the web at
http://dev.perl.org/rfc/
=head1 TITLE
List context return from filesystem functions
=head1 VERSION
Maintainer: Peter Scott [EMAIL PROTECTED]
Date: 6 Aug 2000
Last Modified: 29 Aug 2000
Mailing List: [EMAIL PROTECTED]