On Dec 5, Michael McQuarrie said:
>The "use strict;" requires the arguments to all be quoted. In the real
>script I am only using "use strict 'vars';". This way I can keep the
>syntax of calling the sub the same as I originally had. I would like to
>keep the "error_notify(e,p,x,"Message");" sy
Hello Michael,
Wednesday, December 05, 2001, Michael McQuarrie <[EMAIL PROTECTED]> wrote:
MM> Maxim,
MM> Correction:
MM> The "use strict;" requires the arguments to all be quoted.
yes.
MM> In the real script I am only using "use strict 'vars';". This way
MM> I can keep the syntax of calling t
Maxim,
Correction:
The "use strict;" requires the arguments to all be quoted. In the real script I am
only using
"use strict 'vars';". This way I can keep the syntax of calling the sub the same as I
originally
had. I would like to keep the "error_notify(e,p,x,"Message");" syntax. The "q" is
Maxim,
I have set "use strict;".
Below is a script to test the sub. As is the script should simply print "the script
didnt work".
If you change the last line of the following test script to:
error_notify(q,"the script didnt work");
It fails with this message:
Can't find string terminato
Hello Michael,
Wednesday, December 05, 2001, Michael McQuarrie <[EMAIL PROTECTED]> wrote:
MM> I am defining a sub that takes only specific options:
MM> sub error_notify
MM> {
MM> my $ERR_USAGE = "error_notify (e,p,x, \"Message Text\")\n";
MM> foreach (@_)
MM> {
MM> if(/^e$/) {
I am defining a sub that takes only specific options:
sub error_notify
{
my $ERR_USAGE = "error_notify (e,p,x, \"Message Text\")\n";
foreach (@_)
{
if(/^e$/) { push @ERR_OPTS, "email"; }
elsif (/^p$/) { push @ERR_OPTS, "page";