🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.perl
Article #39900

Re: Podmiana znakow w stringu

#39900
From: vellezz
Date: Tue, 02 Nov 2004 17:30
16 lines
2021 bytes
Użytkownik "Dariusz Sznajder" <darek-news@beast.tu.kielce.pl> napisał w
wiadomości news:slrn.pl.cofftr.405.darek-news@NO-SPAM.beast.tu.kielce.pl...
> > for $i (0..($count=@$data-1)) {
> >     for $j (0..($count=@dos_852-1)) { #wymiana znakow w stringu z nazwa
> >  $data->[$i]->[2] =~ s/$dos_852[$j]/$iso8859_2[$j]/eg;
> >  $data->[$i]->[2] =~ s/\'/\"/; # zmiana ' na "
> >  $data->[$i]->[2] =~ s/"/\\\"/g; # <<<<< coś z tym jest nie tak
> Bynajmniej.
> Za to z miejscem, w które to wstawiłeś - jak najbardziej.
> Hint: ile razy wykonuje się ten for?

@$data-1 w tej chwili ok 10 ale z 3000 - 4000 później natomiast @dos_852-1 -
18 razy bo tyle jest różnic między iso8859-2 a dos852. Myślisz, że
powinienem wyrzucić z tej pętli tego regexp'a i zrobić oddzielną pętlę?
Struktura $data -> tablica ->tablica
Technical Details
Message-ID: <cm8gca$rf0$1@nemesis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!newsfeed.atman.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <cm86gs$f7q$1@atlantis.news.tpi.pl> <Xns9595A33B95EEAelhber1lidotechnet@62.89.127.66> <cm88ku$qsn$1@atlantis.news.tpi.pl> <Xns9595A97065151elhber1lidotechnet@62.89.127.66> <cm8bvg$8aj$1@nemesis.news.tpi.pl> <cm8cu7$ch2$1@nemesis.news.tpi.pl> <slrn.pl.cofftr.405.darek-news@NO-SPAM.beast.tu.kielce.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!newsfeed.atman.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: "vellezz" <vellezz@polbox.com>
Newsgroups: pl.comp.lang.perl
Subject: Re: Podmiana znakow w stringu
Date: Tue, 2 Nov 2004 18:30:58 +0100
Organization: tp.internet - http://www.tpi.pl/
Lines: 19
Message-ID: <cm8gca$rf0$1@nemesis.news.tpi.pl>
References: <cm86gs$f7q$1@atlantis.news.tpi.pl> <Xns9595A33B95EEAelhber1lidotechnet@62.89.127.66> <cm88ku$qsn$1@atlantis.news.tpi.pl> <Xns9595A97065151elhber1lidotechnet@62.89.127.66> <cm8bvg$8aj$1@nemesis.news.tpi.pl> <cm8cu7$ch2$1@nemesis.news.tpi.pl> <slrn.pl.cofftr.405.darek-news@NO-SPAM.beast.tu.kielce.pl>
NNTP-Posting-Host: akk21.neoplus.adsl.tpnet.pl
X-Trace: nemesis.news.tpi.pl 1099416778 28128 83.26.14.21 (2 Nov 2004 17:32:58 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Tue, 2 Nov 2004 17:32:58 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit