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 understand what $@ really is. Is it a string? A hash reference? When I simply print "$@" after the failed command, I see the error I expect. But when I do something like:
mailwarning($@) unless $ftp; and the subroutine mailwarning() has: my $message = @_; the value of $message is "1". It is clear that I am not referencing $@ properly. I tried assuming I needed to reference it when passing it to the sub with a backslash, but that didn't work. Would anyone care to point out what I am failing to understand about the variable $@ and how it should be referenced in this example? I'm assuming it's not a string as I thought. I can just assign the value of $@ to a string and pass that to my sub, but of course that won't teach me anything. :) Thanks much! -Ian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]