Thanks to all,
It works!
Lixin
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of P
N
Sent: Friday, October 29, 2004 3:39 PM
To: [EMAIL PROTECTED]
Subject: Re: [Perl-unix-users] Pass argument to a method
Hi Lixin,
To make it work, instead of using
Hi Lixin,
To make it work, instead of using "$ARGV[0]"
You may want to try this:
my $command_line = shift(@_);
Phil
--- "Cai, Lixin (L.)" <[EMAIL PROTECTED]> wrote:
> Now I am meeting the problem: my codes is like:
>
> **
> $ldapsearch="/usr/bi
Hi Cai,
You try to get the first command line argument with $ARGV[0] contains in
array @ARGV.
I think for your function you should use "@_" or "shift" to get the
function passed arguments.
my ($command_line) = @_; # precise more variable for several arguments
or
my $command_line = shift;
Olivier