My question pertains to using command line variables in Perl. 
I created a script that uses SQL and runs from an application, and the only
parameter is optional.  This script works well when the parameter is
required or not used at all.
I have altered the SQL script so that it can accept a variable or execute
the query without it, but I need to do the same in Perl.

I am using @ARGV and explicitly assigning it to a variable.  Below is an
excerpt:
        if (defined(@ARGV[1])) 
        {
                $filename = @ARGV[1];
                $sth->execute($filename) || die "Couldn't execute statement
" . $sth->errstr;

This is my first script, so I have been reading, researching and testing
what I find. However, I found nothing about this anywhere.


Please help!
Thanks,
Kim

Reply via email to