This is easy. Use Data::Postponed. I wrote this module to handle just this kind of task.
use Data::Postponed 'postpone_forever'; $a = ''; $str = postpone_forever( "blabla" . $a . "blabla" ); $a = "XXX"; print "$str\n"; # prints blablaXXXblabla
[Edit. I originally goofed by using $x instead of $a. Sorry. That typo is gone now. I also made the string "$blabla${a}blala" nicer to read.]
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to Re: Create string with a delay
by diotalevi
in thread Create string with a delay
by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |