Answers for "ruby read line"

1

ruby file get line number

## Like in PHP
## To get line number
__LINE__

## To get file name
__FILE__
Posted by: Guest on November-18-2021
-1

ruby read file line by line

File.readlines('foo').each do |line|
	puts line
end
Posted by: Guest on January-06-2022

Browse Popular Code Answers by Language