On Thu, October 18, 2007 11:20 am, Matthew Whipple wrote:
> [EMAIL PROTECTED] wrote:
>> On Thu, October 18, 2007 9:39 am, Matthew Whipple wrote:
>>
>>> Paul wrote:
>>>
>>>> I am assigned the output of a function to a variable.
>>>>
>>>> my$variable = (function);
>>>> print "$variable\n";
>>>>
>>>> The output is:
>>>> text
>>>> 0
>>>>
>>>> So I try this:
>>>>
>>>> chop my$variable = (function);
>>>> print "$variable\n";
>>>>
>>>> The output is:
>>>> text
>>>> *** this is blank space output *****
>>>>
>>>> So it get's rid of the "0", but outputs a new line.
>>>>
>>>> I try double chopping with same results.
>>>>
>>>> How can I finally get rid of it, I just want the text output.  Ugh.
>>>>
>>>>
>>>>
>>> Try chop followed by chomp
>>>
>>>
>>
>> It doesn't work.  For some reason, this always seems to be the hardest
>> thing for me in perl.  Ugh.
>>
>>
>>
>>
> Can you post the appropriate code?  Depending on what the function is
> used for you could potentially change the return value there.  You could
> also check to make sure that it is in fact a new line character in case
> it somehow ended up as something odd that is behaving that way.
> Something like ord(substr($variable, 1)) after chop (and chomp).
>

The function is like this:

my$variable = (system "/usr/sfw/bin/openssl rsautl -decrypt -inkey
private.pem -in cryptedfile")





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to