Article View: pl.comp.lang.perl
Article #39882grepowanie wg listy
From: primoh
Date: Sat, 30 Oct 2004 11:34
Date: Sat, 30 Oct 2004 11:34
20 lines
1125 bytes
1125 bytes
Witam
Mam dwie tablice:
@tab1 = ("Ragf", "Rasdf", "Fdefdg", "ASDCF");
@tab2 = ("R","F");
Chcialbym otrzymac tablice @tab3, ktora bedzie zawierala elementy @tab1
pasujace do @tab2, czyli;
@tab3 = grep(/R/,@tab1);
@tab3 = grep(/F/,@tab1);
ale w jednym wywolaniu grepa, cos na ksztalt:
@tab3 = grep(/@tab2/,@tab1);
Jak to zrobic?
--
Pozdrawiam, primoh
"I wish I was home with a big bag of potato chips. Mmm... potato
chips..."
Technical Details
Message-ID:
<clvu7i$oh4$1@inews.gazeta.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail From: primoh <primoh_wytnij_@gazeta.pl> Newsgroups: pl.comp.lang.perl Subject: grepowanie wg listy Date: Sat, 30 Oct 2004 13:34:11 +0200 Organization: "Portal Gazeta.pl -> http://www.gazeta.pl" Lines: 20 Message-ID: <clvu7i$oh4$1@inews.gazeta.pl> NNTP-Posting-Host: staticline2647.toya.net.pl Mime-Version: 1.0 X-Trace: inews.gazeta.pl 1099136050 25124 217.113.236.39 (30 Oct 2004 11:34:10 GMT) X-Complaints-To: usenet@agora.pl NNTP-Posting-Date: Sat, 30 Oct 2004 11:34:10 +0000 (UTC) X-User: primoh User-Agent: KNode/0.7.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit