Article View: pl.comp.lang.perl
Article #304Re: Wyszukiwanie w znakach
From: Piotr Manturzyk
Date: Mon, 02 Jun 1997 16:38
Date: Mon, 02 Jun 1997 16:38
36 lines
1425 bytes
1425 bytes
Grzegorz Szyszlo wrote: > > gdyby bylo to takie proste. $ jest znakiem specjalnym, > wykorzystywanym w ~= do innych celow. i mi wychodzi ze: > > plik: przyklad > #!/usr/bin/perl > > $tekst = "Ala"; > "l" ~= /$tekst/; > print "$1\n"; > > uruchomienie: ./przyklad > > rezultat: > syntax error at ./ttt line 4, near ""l" ~" > Execution of ./ttt aborted due to compilation errors. > #!/usr/bin/perl $text='ma'; $TEXT='Ala ma kaca'; $TEXT=~/($text)/; print $1; nawiasy musza byc, bo inaczej zmienna $1 bedzie pusta. gandalf -- _________ _________ | DC Piotr Manturzyk | | mailto:manturzyk@chemie.uni-halle.de | |____ University of Halle, Germany ____|
Technical Details
Message-ID:
<3392F6F1.708F0EE@chemie.uni-halle.de>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!uw.edu.pl!news.nask.pl!usenetReferences:
<5mplnr$hpo$1@helios.man.lublin.pl> <5mruj9$n6t$1@galaxy.uci.agh.edu.pl> <5mukd3$24f$2@helios.man.lublin.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!news.icm.edu.pl!uw.edu.pl!news.nask.pl!usenet From: Piotr Manturzyk <manturzyk@chemie.uni-halle.de> Newsgroups: pl.comp.lang.perl Subject: Re: Wyszukiwanie w znakach Date: Mon, 02 Jun 1997 18:38:09 +0200 Organization: University of Halle, Germany Lines: 36 Message-ID: <3392F6F1.708F0EE@chemie.uni-halle.de> References: <5mplnr$hpo$1@helios.man.lublin.pl> <5mruj9$n6t$1@galaxy.uci.agh.edu.pl> <5mukd3$24f$2@helios.man.lublin.pl> NNTP-Posting-Host: columbus.studwerk.fh-merseburg.de Mime-Version: 1.0 X-Mailer: Mozilla 3.01 (X11; I; Linux 2.0.30 i586) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit