in reply to Re: printing variable and evaluation (updated)
in thread printing variable and evaluation

Thank you for the insights.

This "Guts of Perl debugging" looks a bit intimidating.

Is there no way to read the input variable

$variable

as a literal string before any processing or evaluation is done? then let perl do an eval of the variable?

Replies are listed 'Best First'.
Re^3: printing variable and evaluation
by haukex (Archbishop) on Jul 07, 2017 at 11:27 UTC
Re^3: printing variable and evaluation (updated) -- evil double eval
by Discipulus (Canon) on Jul 08, 2017 at 09:26 UTC
    Given what I already said (it is unwise) and good modules suggested as symbol table inspector ie Data::Dumper::Names which uses PadWalker you probably mean something like the following (working for scalar, must be modified for arrays and hashes)?

    perl -e " my $x = 15; print map {$_.' = '.eval eval{$_} } '$x' " $x = 15

    Again: this leads you on a wrong path, might be worth to know but not to be used

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.