Article View: pl.comp.lang.perl
Article #39707Pytanie nowicjusza
From: Moon
Date: Thu, 14 Oct 2004 16:37
Date: Thu, 14 Oct 2004 16:37
20 lines
1315 bytes
1315 bytes
Witam,
od razu mówię, że w Perlu jestem kompletnie 'zielony', ale mam prośbę aby
ktoś z Was przetłumaczył mi na 'ludzki język' poniższy fragment kodu:
$abc = shift;
sub swap($$)
{
$_ = shift; <- ??
$e = "." x shift; <- ??
s/($e)($e)/$2$1/g; <- to jest wyrażenie regularne, tyle wiem :)
return $_; <- funkcja zwraca wartość, to zrozumiałe.
}
Dzięki wielkie z góry!
Pozdro.
--
<Moon>
[adres Reply-To zaszyfrowany ROT13]
Technical Details
Message-ID:
<selxbcly44mx.3qe4mihyriz3$.dlg@40tude.net>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.task.gda.pl!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.task.gda.pl!not-for-mail From: Moon <moon@world.universe> Newsgroups: pl.comp.lang.perl Subject: Pytanie nowicjusza Date: Thu, 14 Oct 2004 18:37:06 +0200 Organization: CI TASK http://www.task.gda.pl Lines: 20 Message-ID: <selxbcly44mx.3qe4mihyriz3$.dlg@40tude.net> Reply-To: zbbayvtugre@b2.cy NNTP-Posting-Host: dnr240.neoplus.adsl.tpnet.pl Mime-Version: 1.0 X-Trace: korweta.task.gda.pl 1097771821 8372 83.24.99.240 (14 Oct 2004 16:37:01 GMT) X-Complaints-To: abuse@news.task.gda.pl NNTP-Posting-Date: Thu, 14 Oct 2004 16:37:01 +0000 (UTC) X-Original-Organization: CI TASK http://www.task.gda.pl User-Agent: 40tude_Dialog/2.0.12.1pl X-Organization-Notice: Organization line has been filtered Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit