Archived

This topic is now archived and is closed to further replies.

PERL gurus: Quick question

This topic is 5149 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Would somthing like
my $files_buffer =
	interpolate_items($files, '%file%', $main:roject_file_template);
    interpolate('%name%', $main::opt_name, \$files_buffer);   
Create the variable $files_buffer, with the contents returned from `interpolate_items' and then append the contents returned from `interpolate' to it? Does `\$files_buffer' mean "append to"? Sorry, I am limited in my knowlage of Perl. [edited by - aftermath on November 6, 2003 7:39:57 PM]

Share this post


Link to post
Share on other sites
yes it would create the variable $files_buffer. Well sort of. Regardless, after that statement, you would have a variable called $files_buffer with whatever interpolate_items() returned as its value.

I dont think there is any appending going on here. Its just 2 seperate funcion calls. Do you have any idea what the 2 functions return? If they are strings, then the way to append strings is to use a ''.'', eg: "hello"." world" -> "hello world"

a ''\'' (backslash) means reference to. It is sort of like the & operator in c++ if that helps. It just gets the address of the variable. No it does not mean "append to".

Maybe if you post more code and be specific about what your trying to do, we can better help.

Share this post


Link to post
Share on other sites