Forum » Programiranje » Out of memory in Perl???
Out of memory in Perl???
![](https://static.slo-tech.com/stili/avatar_gray.gif)
poweroff ::
Pozenem naslednji perl programcek:
open(FILE,"$file") ";
local $\ = undef;
my @file = < FILE >;
close(FILE);
In zajavka da je out of memory.
Je pa res da je file velik 67 Mb.![:D](https://static.slo-tech.com/smeski/icon_biggrin.gif)
Kako resiti problem?
Zadevo poganjam v ActivePerlu v Windowzih Me.
open(FILE,"$file") ";
local $\ = undef;
my @file = < FILE >;
close(FILE);
In zajavka da je out of memory.
Je pa res da je file velik 67 Mb.
![:D](https://static.slo-tech.com/smeski/icon_biggrin.gif)
Kako resiti problem?
Zadevo poganjam v ActivePerlu v Windowzih Me.
![](https://static.slo-tech.com/stili/avatar_gray.gif)
simon ::
Problem je tukajle:
local $\ = undef;
my @file = < FILE >;
ko naredis undef $\ (input record separator), bo perl vse vrstice v datoteki interpretiral v eno, torej bos potem imel v @file celotno datoteko v $file[0]. Kaj to res hoces?
local $\ = undef;
my @file = < FILE >;
ko naredis undef $\ (input record separator), bo perl vse vrstice v datoteki interpretiral v eno, torej bos potem imel v @file celotno datoteko v $file[0]. Kaj to res hoces?
![](https://static.slo-tech.com/stili/avatar_gray.gif)
darh ::
sj ne vem zakaj bi zloudou cel file v en array.... sj lohka usako vrstico posebej pregledaš... WHILE.....
Excuses are useless! Results are priceless!
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | Brskanje v tujini z domačim IP-jemOddelek: Omrežja in internet | 2539 (1828) | MrStein |
» | [Java]: replace - slovar v txtOddelek: Programiranje | 1719 (1577) | Spura |
» | Program za preimenovanje slikOddelek: Zvok in slika | 1161 (1088) | vratar |
» | [visual c++] #ifdef _DEBUGOddelek: Programiranje | 1126 (1067) | Vesoljc |
» | UnicodeOddelek: Programiranje | 1327 (1218) | Vesoljc |