Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

RE: lug-bg: Perl wizards


  • Subject: RE: lug-bg: Perl wizards
  • From: bkrosnov@xxxxxxxxx (Boyan Krosnov)
  • Date: Tue, 24 Oct 2000 16:15:34 +0300



Hi all,

mislq che towa ti trqbwa :)

#loadwane na zapisite w nqkakyv hash kato key-a na hash-a ti 
#e neshtoto po koeto iskash da sa unikalni
open(F,"<filename");
while (<>) {
  chomp;
  @a=split(/ /);
  $hash{$a[0]}=$_; 
# twa prawi hash s key poleto do pyrwiq interval .. 
# ako ima redowe s ednakwa pyrwa kolona te shte se zapishat w syshtiq
element na hasha
# t.e. shte ostane posledniq red s tozi key
# zabeleji che e mnogo lesno da prawish unikalnost po proizwolen kriterij
}
close(F);
#pisane na zapisite
open(F,">filename");
while (($key,$value)=each(%hash)) {
  print $value;
}
close(F);
#tolkoz

Regards,

--
Boyan Krosnov (http://www.nat.bg/~bkrosnov)
Network Administrator
Lirex BG Ltd. 

> -----Original Message-----
> From: Peter Georgiev [mailto:peterg@xxxxxxxxxxxxx]
> Sent: Tuesday, October 24, 2000 1:44 PM
> To: LUG-BG
> Subject: lug-bg: Perl wizards
> 
> 
> Hiya all,
> 
> Znachi imam textov file s okolo 200000 zapisa,
> kato vseki zapis e na otdelen red.
> 
> Iskam da izchistia tezi zapisi, koito se dublirat.
> 
> Niakoi mozhe li da drasne edno redche na Perl, che hich me niama...
> 
> TKS in ADV
> Pesho
> ==================================================================
> A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
> Otpiswaneto RABOTI !!! : Majordomo@xxxxxxxxxxxxxxxxxx 
> UNSUBSCRIBE LUG-BG
> http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. 
> - Stara Zagora
> 

==================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
Otpiswaneto RABOTI !!! : Majordomo@xxxxxxxxxxxxxxxxxx UNSUBSCRIBE LUG-BG
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora




 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.