V
Vedran
Hello,
I am writing an xchat script, here is the part of code making me problems:
IRC::add_command_handler("", "enc");
....
sub enc {
my $target = IRC::get_info(2);
my $input = $_[0];
# print "-$input-\n"; prints for eg. -bla-
but:
my $ciphertext = $cipher->encrypt($$input);
won't work
but if I write:
my $input = "bla";
my $ciphertext = $cipher->encrypt($$input);
then It works.
What is the difference betweek $input = $_[0] and $input = "bla" ?
Aren't those bot scalars?
How can I do the $_[0] to be the same type of other string?
Thanks Smile
PS. I've tried with $_[0][0] $$input and similar but they are all empty Sad
I am writing an xchat script, here is the part of code making me problems:
IRC::add_command_handler("", "enc");
....
sub enc {
my $target = IRC::get_info(2);
my $input = $_[0];
# print "-$input-\n"; prints for eg. -bla-
but:
my $ciphertext = $cipher->encrypt($$input);
won't work
but if I write:
my $input = "bla";
my $ciphertext = $cipher->encrypt($$input);
then It works.
What is the difference betweek $input = $_[0] and $input = "bla" ?
Aren't those bot scalars?
How can I do the $_[0] to be the same type of other string?
Thanks Smile
PS. I've tried with $_[0][0] $$input and similar but they are all empty Sad