M
Martin Keiter
Hi,
I would like to do something like this:
$sentence = "$1 is here!";
....
if ($string =~ m/(.*) comes in/) {
print $sentence;
}
This of course does not work, as $1 is evaluated when $sentence is
initialized. But also setting
$sentence = "\$1 is here!"
does not work - it just prints
$1 is here!
is there a way to evaluate th "$1" inside of $sentence at the time when
$sentence is used?
I would like to do something like this:
$sentence = "$1 is here!";
....
if ($string =~ m/(.*) comes in/) {
print $sentence;
}
This of course does not work, as $1 is evaluated when $sentence is
initialized. But also setting
$sentence = "\$1 is here!"
does not work - it just prints
$1 is here!
is there a way to evaluate th "$1" inside of $sentence at the time when
$sentence is used?