don't know how to write array
don't know how to write array
(OP)
I'm trying to write a program to change permissions on the mail folders. I found a pre-written program that should accomplish this but am just learning Perl. This is my questionable code:
my ($file, %perms, $account, $mask, @rights);
foreach $file (@ARGV) {
next unless -e $file ; # make sure if exists
if (Win32::FileSecurity::Get( $file, \%perms ) ) {
What is @ARGV and how do I write the array? Thanks for any help!
my ($file, %perms, $account, $mask, @rights);
foreach $file (@ARGV) {
next unless -e $file ; # make sure if exists
if (Win32::FileSecurity::Get( $file, \%perms ) ) {
What is @ARGV and how do I write the array? Thanks for any help!
RE: don't know how to write array
perl myscript.pl argument1 argument2
The arguments here are argument1 and argument2
I don't know if you can modify this array.
RE: don't know how to write array
-Vic
RE: don't know how to write array
t.pl you me someone
$ARGV[0] contains 'you'
$ARGV[1] contains 'me'
$ARGV[2] contains 'someone'
Actually -- you *can* modify @ARGV, though I don't think that's what you want to do, I think that understaning the command line thing will sort you out.
Just for interests sake, here's an example of modifying @ARGV, this fragment here:
print "$ARGV[0]\n";
$ARGV[0]='AAARRGGHH';
print "$ARGV[0]\n";
in a file called t.pl, run it like this
t.pl you
it prints
you
AAARRGGHH
Mike
michael.j.lacey@ntlworld.com
Cargill's Corporate Web Site