in reply to Create string with a delay
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.]
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Create string with a delay
by Anonymous Monk on Jun 14, 2006 at 20:14 UTC | |
by diotalevi (Canon) on Jun 14, 2006 at 20:24 UTC |