Welcome to PerlMonks!
That depends on what value you assign to the variable $/. By default, it is set to the new line character (\n) but it can be set to any character or even a string with many characters. See perlvar.
Every time you read a line, Perl reads upto and including the end of line mark set in $/. To remove the end of line mark from a line you just read in, you use chomp. You may also find this link in the perl documentation helpful: How-can-I-read-in-an-entire-file-all-at-once?.
In the future you may want to consider asking simple questions about the meaning of terms in the chatter box (look for it on the sidebar on the right). In the chatterbox we can quickly go back and forth to clear up any misunderstandings. Another comment: I strongly encourage you to follow those documentation links. Perl documentation can be hard to read when you are first beginning, but the more you do it, the easier it gets. The more you expose yourself to programming jargon, the faster you will progress.
Best, beth
In reply to Re: Reading lines from a file
by ELISHEVA
in thread Reading lines from a file
by trewq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |