Thank you all, worked like a charm.
Old shell habits are hard to break ;-)
Derrick Ballentine
Automation Support Specialist
District Court - Western Arkansas
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 09, 2005 10:39 AM
> To: beginners@perl.org
> Subject: Seeding variables from command line
>
> Sorry to bother everyone, but i was working on this yesterday and i
&
[EMAIL PROTECTED] wrote:
> Sorry to bother everyone, but i was working on this yesterday and i
> couldn't get it to work. I guess i have the wrong syntax for passing
> variables in from the command line.
>
> Here's my script:
>
> = crypt.pl =
> #!/usr/bin/perl
> my $pwd = $1;
> my $seed
On Aug 9, [EMAIL PROTECTED] said:
my $pwd = $1;
my $seed = $2;
That's shell syntax, Derrick. Perl's command-line arguments are stored in
@ARGV.
my ($pwd, $seed) = @ARGV;
or
my $pwd = $ARGV[0];
my $seed = $ARGV[1];
my $key = substr(crypt("$pwd","$seed"),2);
Those quotes around $
Sorry to bother everyone, but i was working on this yesterday and i
couldn't get it to work. I guess i have the wrong syntax for passing
variables in from the command line.
Here's my script:
= crypt.pl =
#!/usr/bin/perl
my $pwd = $1;
my $seed = $2;
my $key = substr(crypt("$pwd","$seed