"Dr.Ruud" schreef:
> Paul Johnson:
>> sub half
>> {
>> my ($val) = @_;
>> $val / 2;
>> q/
>> Returns $val divided by 2
>> /;
>> }
>
> Variant:
>
> sub half {
> return unless defined $_[0];
> return $_[0] / 2;
>
> q/*
> Returns
> $val
> divided
> by 2
> */
> }
>
> q/*
> This is
> a multi-
> line comment.
> */ if 0;
I forgot to add that this compiles clean under strictures and warnings.
--
Affijn, Ruud
"Gewoon is een tijger."
Thread Previous
|
Thread Next