17 lines
278 B
Perl
17 lines
278 B
Perl
|
|
||
|
@a1 = (1, 2, 3);
|
||
|
open FILEHANDLE, ">array.dat" or die "Can not open array.dat";
|
||
|
|
||
|
print FILEHANDLE "@a1";
|
||
|
|
||
|
close FILEHANDLE;
|
||
|
|
||
|
open FILEHANDLE2, "<array.dat" or die "Can not open array.dat";
|
||
|
|
||
|
@a2 = split(" ", <FILEHANDLE2>);
|
||
|
|
||
|
print "@a2";
|
||
|
|
||
|
close FILEHANDLE2;
|
||
|
|
||
|
|