It does not seem to be working. I get the following message:
Use of uninitialized value in concatenation (.) or string at scop/x.pl line 126.
buffer:
Line 126 is where print "buffer: $buf\n"; is.
Also, what is the structure under my ($buf); in your code? Is that how PERL creates a macro or what C calls prototypes?
I've also tried the first method mentioned above and that also fail to initialize the variable $var. In that first function, what is the significant of "qw"?
Thanks.