On 14 Mar 2009 23:52:00 +0200, Evgeny wrote: > > Can I have a prototype specifically for regexps?
Numerical or string value or reference or blessed reference (object) are all specified as "$" in function prototyping. Read "perldoc perlsub", under Prototypes secion. But you may want to start from less a advanced documentation. > I don't see it in the docs, and what this means that when I want to > pass a regexp to a function - I MUST use qr// and can't just use /.../ > when writing the regexp as a parameter. > > Like > > Given / ... / -- does not work You can't say it does not work. Works as expected. See my first message. > - but - > Given qr/ ... / -- does work This works too, just for a different case. Did not you run the example from my first message? /.../ evaluates regular expression, and qr/.../ operator returns something between a regular string and an object. Read "perldoc perlop" under Regexp Quote-Like Operators section. I would suggest you to take some time with the perl interpreter and the documentation before asking more questions. :) Regards, Mikhael. -- perl -e 'print+chr(64+hex)for+split//,d9b815c07f9b8d1e' _______________________________________________ Perl mailing list [email protected] http://perl.org.il/mailman/listinfo/perl
