I am trying to turn a number into a text file that I found with a regular expression, into a list of numbers starting from zero.
for example, the number 4I need to create an array consisting of 0,1,2,3.
4
0,1,2,3
How can I do that?
You can use the range operator as:
@arr = 0..$number_read_from_file - 1;
Source: https://habr.com/ru/post/1789508/More articles:Visualize vector graphics in Java, which library? - javaQt - QTreeView и SQL - рекомендации по производительности - c++error in multiple select statements in Insert statement - sqlgoogle maps api - javascriptЕсть ли способ получить уведомления о новых драгоценных камнях с помощью Bundler? - rubyInputStream.bytesRemaining меньше, чем должно быть - javaHow to convert NSArray to integer values - iosLock password - javascriptiphone, using an array to determine in the range of the main graph - iphonegetting the value of $ (ProjectDir), $ (SolutionDir) in a vcproj file - visual-studio-2008All Articles