>Thanks! Changing:
>my $message = @_;
>to:
>my ($message) = @_;
>did put the correct value in the string.
>If anyone cares to explain the difference between the code I had and the code
>Shishir suggested so I can understand why this makes a difference, I'm all
>ears!
@_ is an array.
You wer
sub.
Wags ;) ps others may be to make clearer.
-Original Message-
From: Ian Zapczynski [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 03, 2002 12:34
Cc: [EMAIL PROTECTED]
Subject: Re: How to pass the value of $@ to a subroutine
Thanks! Changing:
my $message = @_;
to:
my ($message
Thanks! Changing:
my $message = @_;
to:
my ($message) = @_;
did put the correct value in the string.
If anyone cares to explain the difference between the code I had and the code
Shishir suggested so I can understand why this makes a difference, I'm all
ears!
Thanks again,
-Ian
"Shishir K.
>Hello all,
>What I want to do is simple - if an error occurs on my previous command
>(in this case, making an FTP connection via Net::FTP), I want to send
>the value of $@ to a subroutine which sends an e-mail containing the
>value of $@ in the body. However, it is clear that I don't understan