On Wed, Aug 5, 2009 at 05:21, Dermot wrote:
> 2009/8/5 Chas. Owens :
>> On Tue, Aug 4, 2009 at 23:07, Dave Tang wrote:
>>> On Wed, 05 Aug 2009 12:55:22 +1000, Chas. Owens
>>> wrote:
>>>
>>> snip
>
> Here's someone's recent experience of encountering prototypes:
>
> http://perlhacks.com/2009/06/wha
2009/8/5 Chas. Owens :
> On Tue, Aug 4, 2009 at 23:07, Dave Tang wrote:
>> On Wed, 05 Aug 2009 12:55:22 +1000, Chas. Owens
>> wrote:
>>
>> snip
Here's someone's recent experience of encountering prototypes:
http://perlhacks.com/2009/06/what-is-wrong-with-this-picture.php
Good luck,
Dp.
--
To
On Tue, Aug 4, 2009 at 23:07, Dave Tang wrote:
> On Wed, 05 Aug 2009 12:55:22 +1000, Chas. Owens
> wrote:
>
> snip
>>
>> In this case it is telling Perl that compare expects two scalars as
>> arguments.
>
> snip
>
> Now the compare($$) makes much more sense.
>
> snip
>>
>> There are many [pitfalls
On Wed, 05 Aug 2009 12:55:22 +1000, Chas. Owens
wrote:
snip
In this case it is telling Perl that compare expects two scalars as
arguments.
snip
Now the compare($$) makes much more sense.
snip
There are many [pitfalls][2] to prototypes and they should really not be
used unless you have a
On Tue, Aug 4, 2009 at 19:30, Dave Tang wrote:
snip
> sub compare($$) {
snip
> running this script, but just wanted to know its purpose in compare($$).
snip
Those are [prototypes][1]. They change how Perl thinks about the
function call. In this case it is telling Perl that compare
Dave Tang wrote:
Hi everybody,
Hello,
I was reading perlfaq7.pod, 7.15: How can I pass/return a {Function,
FileHandle, Array, Hash, Method, Regex}?
In one of the examples it shows how regular expressions can be passed to
subroutines:
sub compare($$) {
Hi everybody,
I was reading perlfaq7.pod, 7.15: How can I pass/return a {Function,
FileHandle, Array, Hash, Method, Regex}?
In one of the examples it shows how regular expressions can be passed to
subroutines:
sub compare($$) {
my ($val1, $regex) = @_;