Is it possible to know the variable that was replaced by its value inside a double quotes in Perl? -


say you've :-

my $variable = 'value';  $text = "$variable stored inside scalar variable.\n";  print "$text\n"; 

now, when see output, value stored inside scalar variable.

i want information that, here $variable replaced 'value'. possible?

i'm trying list of such statements variable replaced value. e.g. let's file 1 has above piece of code. file 2 has following:

print "welcome $website!!"; 

file 3 has - print "output emailed..";

i'm trying details file 1 has my $text = "$variable stored inside scalar variable.\n"; , file 2 has print "welcome $website!!";

file 3 not counted.

this shows backtrace whenever variable read. close enough?

package peekaboo; require tie::scalar; our @isa = 'tie::stdscalar'; use carp 'cluck'; sub fetch { cluck }  package main; $variable = 'value'; tie $variable, 'peekaboo'; $text = "$variable stored inside scalar variable.\n"; 

if not, need b::utils , padwalker. don't know how use them.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -