sub read_file_inarray
{
local $file =
$_[0];
local @lines;
local $/="\n";
# this for set the
separator
open ( R, "$file" ); @lines=<R>; close ( R );
for ( my $a=0;$a<=$#lines;$a++ ) { chop $lines[$a] } # if you
dont want to find again the separator in your array return ( @lines); }
@lines =
&read_file_inarray("your_file");
in
this case you will have one line for each value of @lines
default value of $/ is "\n";
I hope
it was this you were looking for
bye
|
- Read lines in txt Rodrigo
- RE: Read lines in txt Toby Stuart
- De Fazio Emanuele