] Is there a way to find the ASCII value of a character in perl, so that I

] can ouput the ASCII code and the character in the following code?

]

]     @chars=split('',$line);

]     foreach $ch (@chars) {

]     print "$ch ";

]     }

]

] Thanks

]   Roy



How about:



my $temp = $line;

$temp =~ s/(.)/printf("%03d\t$s\n", ord($1), $1)/ges;







-- Matt Grimaldi







*******************Internet Email Confidentiality Footer*******************





Privileged/Confidential Information may be contained in this message.  If you

are not the addressee indicated in this message (or responsible for delivery of

the message to such person), you may not copy or deliver this message to anyone.

In such case, you should destroy this message and kindly notify the sender by

reply email. Please advise immediately if you or your employer do not consent to

Internet email for messages of this kind.  Opinions, conclusions and other

information in this message that do not relate to the official business of my

firm shall be understood as neither given nor endorsed by it.





_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl

Reply via email to