R
Ronny
I get a weird error message saying
"Did not find leading dereferencer, detected at
offset 6728syntax error at ... near "mk_remote_filename"
The expression in question is this:
join(' ', 'rcp', map(mk_remote_filename, @_))
where mk_remote_filename is a sub defined earlier, prototyped
as
sub mk_remote_filename($)
Maybe Perl doesn't like the isolated occurence of the bareword
mk_remote_filename here (it doesn't look very perlish to me),
but when I check the perldoc for the function map, it mentions
a very similar construct. From the perldocs:
"@chars = map(chr, @nums);
translates a list of numbers to the corresponding characters."
What am I doing wrong? Of course I could also write
(map { mk_remote_filenam $_ } @_)
but I wonder why it doesn't work the way I wrote it.
Ronald
"Did not find leading dereferencer, detected at
offset 6728syntax error at ... near "mk_remote_filename"
The expression in question is this:
join(' ', 'rcp', map(mk_remote_filename, @_))
where mk_remote_filename is a sub defined earlier, prototyped
as
sub mk_remote_filename($)
Maybe Perl doesn't like the isolated occurence of the bareword
mk_remote_filename here (it doesn't look very perlish to me),
but when I check the perldoc for the function map, it mentions
a very similar construct. From the perldocs:
"@chars = map(chr, @nums);
translates a list of numbers to the corresponding characters."
What am I doing wrong? Of course I could also write
(map { mk_remote_filenam $_ } @_)
but I wonder why it doesn't work the way I wrote it.
Ronald