# Reading multiple integers from the same line without string manipulation

**URL:** https://discourse.julialang.org/t/reading-multiple-integers-from-the-same-line-without-string-manipulation/65572
**Category:** General Usage
**Tags:** question, io, file
**Created:** [July 30, 2021, 8:48pm UTC](https://discourse.julialang.org/t/reading-multiple-integers-from-the-same-line-without-string-manipulation/65572 "2021-07-30T20:48:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![burntclaw](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@burntclaw](https://discourse.julialang.org/u/burntclaw)
#### Post date: [July 30, 2021, 8:48pm UTC](https://discourse.julialang.org/t/reading-multiple-integers-from-the-same-line-without-string-manipulation/65572/1 "2021-07-30T20:48:27Z")

</div>

Hi all! I’m relatively new to Julia. I’m wondering if there is a way to read a line of integers like this in a file without using readline(s) and then parsing and manipulating the resulting string. The text file I want to read from will look something like this:

1 2 3 4\n  
5 6 7 8\n

I want to be able to put 1, 2, 3, 4 into an array and 5, 6, 7, 8 into an array. How can I accomplish this? I have code for using readline and then parsing the string, it’s just annoying and tedious.

Thanks in advance.

---

<div class="post-metadata">

### Author: ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)
#### Post date: [July 30, 2021, 8:55pm UTC](https://discourse.julialang.org/t/reading-multiple-integers-from-the-same-line-without-string-manipulation/65572/2 "2021-07-30T20:55:53Z")

</div>

Numbers as part of a text are not stored the way a number in memory is stored. The process of converting from one representation (text) to the other (memory) is called parsing. You won’t get around doing this on way or another.

If all of your textfiles look like this, you can use CSV.jl (setting the seperator to a space character) or the `DelimitedFiles` standard library function `readdlm` (again, setting the seperator to a space character).
