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

RE: [FWP] binary to ascii to binary




Hey Larry,
Thanks for taking the time to write :)

> Without getting involved in all the issues of user interface and error
> checking and formatting, I'll present the following for you to consider in
> regard to the core conversions.  It's neater.

it is indeed neater, but the actual conversion wasn't what I was doing
with the code. It is good to know that pack and unpack exist though. What
I'm trying to do is improve my logical thinking ability. So I picked a
problem that would take some.
	
	I definately want the program to demonstratably do the conversion
itself. (well, the decimal to binary conversion and vice versa, the
decimal to ascii conversion and back is just the matter of a lookup table
which merely adds to the size of the code. so I sed the built in functions
in perl.) This was more of a reinventing the wheel to understand how the
wheel works thing.
	I am not saying I don't appreciate that you took time out from
your schedule to write me. I very much do. I'm just trying to fully
explain myself better. The way I first want to improve the program is to
cut down the conversion code. Maybe make it a function... the only thing I
can't figure out is the regular expressions.
	Is it possible to put a variable in a regular expression? 
	i.e.
	s/$this/$that/ ? (I know this one itself won't work because $ is
the end of the line char,) For the bin - decimal conversion I might use
multidimensional arrays.. That might be a better way to do it.. (and I'd
get to learn how to do multi-dimensional arrays!)

	Again, thank you for the code. :)
	Joey


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe