| | |
generating 'infinite' strings
Please support our Perl advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Nov 2008
Posts: 15
Reputation:
Solved Threads: 0
Greetinmgs, I am a programming greenhorn and I would like to make a programm which will generate a number in the way that first the user will say how many digits the number should have (i.e. 10 000) and will also specify the rules for creating the number- i.e. every 0 will change to 001 and every 1 will change to 011.
(this programm will later be good for mathematical purposes to recognize some characteristics in these so-called infinite words).
I am interested in which language do you think it will be easiest to programm,
thanks a lot
(this programm will later be good for mathematical purposes to recognize some characteristics in these so-called infinite words).
I am interested in which language do you think it will be easiest to programm,
thanks a lot
•
•
•
•
Okey, I understand, the thing is I know just very little c++ and no perl, but somebody advised me that it will be easier for me to start with perl with no knowledge than in c++ with little knowledge, so that is why I asked.
data types
operators
perls built-in functions
from there you can jump around to accomplish what you need to do.
•
•
•
•
(this programm will later be good for mathematical purposes to recognize some characteristics in these so-called infinite words).
Also there are space restrictions. Most signed 32 bit ints can only go up to something like 2 billion or so. Also most strings can only hold something like 255 characters.
Last edited by jbennet; Nov 23rd, 2008 at 2:42 pm.
If i am helpful, please give me reputation points.
There is no limit on the number of characters perl can store in a string. Maybe you meant something else.
There is also no numerical data type in perl. There are only scalars and lists of scalars. Scalars can be numbers or strings.
There are also a number of Math modules that come with perl that might be helpful:
http://perldoc.perl.org/index-modules-M.html
There is also no numerical data type in perl. There are only scalars and lists of scalars. Scalars can be numbers or strings.
There are also a number of Math modules that come with perl that might be helpful:
http://perldoc.perl.org/index-modules-M.html
![]() |
Other Threads in the Perl Forum
- Previous Thread: substitute a string
- Next Thread: Missed the train - Variable search into an array
| Thread Tools | Search this Thread |
Tag cloud for Perl






