Jump to content
  • Advertisement


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


PERL gurus: Quick question

This topic is 5488 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
AndreTheGiant: Thanks man, it all makes sence now
BlueDev: I love you too !!!!1

Okay, no more help needed, AndreTheGiant basicaly wrapped it up for me

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!