Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] unicode and Perl- how to pass command line unicodearguments



David Riggs wrote:

>
> Somehow your suggested utf8::decode($x) only returns a "1", presumably
> for success, and I do not see how to get it to return the value.
>
Typically I see this happen when the function returns an array.  You're
seeing the number of variables in the returned array probably.  Try
@example.com = xxx()
and see what happens.

Perl detects scalar/list context and behaves differently and if you aren't
used to it, it can throw you.  For  instance $x = @example.com will assign 4 to x if
there are 4 elements in y, or $x = grep something, @example.com gets the number of
matches, not their values.

Steve S.



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links