> -----Message d'origine-----
> De�: Nicolay A. Vasiliev [mailto:[EMAIL PROTECTED]
> Envoy�: vendredi 1 octobre 2004 22:39
> ��: Perl Beginners List
> Objet�: Re: Becoming Disenheartened - Everyone talks about Python and
says
> Perl is old news.
>
> I didn't mean CGI, only standart types.
>
s.replace(...) is a consequence of "everything is object" thinking.
Look at the following:
import re;
m = re.match(r"(?P<int>\d+)\.(\d*)", '3.14');
//After performing this match
//m.group(1) is '3', as is m.group('int')
//and m.group(2) is '14'.
There is a similar ugly thing in Java.
All of this because you want everything to be an object.
Can you tell us how will you perform the above
matching without import re; :).
In Perl you don't absolutely need a kind of use RE; to be able
performing regular expression macthing.
So, don't force my $s = "I am Perl Guru"; to be an object and contain a
replace() method.
$s is a string will be treated as is in Perl.
Jos�.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>