in reply to Re: Module Style and Usage
in thread Module Style and Usage
Difference is due to the different behaviour of reverse() dependent on (list|scalar) context; see the perldoc on it. In the "non working" case, printf() causes the list context for func1() causes the list context for reverse(). Try forcing the scalar context...
printf("String after: %s\n\n", scalar func1($buf));
|
|---|