On Tue, Apr 1, 2008 at 5:17 PM, yitzle <[EMAIL PROTECTED]> wrote:
> On Tue, Apr 1, 2008 at 4:03 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
>  > yitzle wrote:
>  >  > Is there some way to convert it (a string/scalar) to an array?
>  >
>  >  Is this what you mean?
>  >
>  >  my $string = 'ABCDEF';
>  >  my @string = split '', $string;
>  >
>  >
>  >
>  >  Rob
>
>  I suppose. That can be used to extract the last digit.
>  I was actually thinking of, um, is there some function that can be
>  used to convert a string to a list of binary/hex values? Or am I
>  imagining it?
snip

Are you thinking of unpack*?

perl -e 'print map "[$_]\n", unpack "c*", "abcdef"'

* http://perldoc.perl.org/functions/unpack.html

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

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


Reply via email to