If you could focus your question more, it might help us to help you. What isn't working, exactly? What else have you tried? Have you inserted a few prints to help you in debugging (if you've got that far; under use strict and the -w switch your while loop is going to make the interpreter complain about not having declared $l -- not to mention that it's open not Open) Update I've been assured that it's $ one, not $ ell; I blame my fonts =)
Here are a couple of things to look at ..
Check out perldoc perlstyle ( or, on this site, perlman:perlstyle -- it can help you make your code more idiomatic -- in particular your filehandles look strange to a perl-er.)
A couple other general bits of advice: Perl isn't C; you don't have to treat strings as arrays of characters (strings are 'native' to Perl).
If you want to traverse a string character-by-character, you might look into using the substr function and a for loop (since you seem to be coming at this from a C background, I don't expect you'll have a huge problem with that =)..
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
In reply to Re: ascii conversion
by arturo
in thread ascii conversion
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |