# Работа с файлами
open(MYFILE, "filename") || die "Error $!";
$line = <MYFILE>;
while (defined(<MYFILE>)) {
print $_;
}
@all = <MYFILE>;
close(MYFILE);
if (-e "filename") {
if (!open(MYFILE, ">>filename")) {
warn "Warning: $!";
} else {
binmode(MYFILE);
}
}
Perl Справочник v0.05 © 2007-2025 Igor Salnikov aka SunDoctor