in reply to Re: printing variable and evaluation
in thread printing variable and evaluation

Thanks for the help.

I've become too reliant on modules and want to sharpen my own coding skills.

say variable is $reallyLongPathName
pprint($reallyLongPathName)
would return
$reallyLongPathName returns /remoteserver/disk5/usr/local/lib/libavcod +ec.a

Replies are listed 'Best First'.
Re^3: printing variable and evaluation
by Discipulus (Canon) on Jul 07, 2017 at 10:18 UTC
    Hello,

    in my little experience, when you try to access the variable name you are in the wrong path. Use Data::Dumper or better the non CORE module Data::Dump dd method to show up your variables.

    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.
Re^3: printing variable and evaluation
by 1nickt (Canon) on Jul 07, 2017 at 11:18 UTC

    I've become too reliant on modules and want to sharpen my own coding skills.

    I would say that, generally, that's a logical fallacy. Modules are simply tools. Programmers are tool-makers. When you go into a machine shop you see the machinist making tools *that don't already exist* to accomplish a specific task, not crafting a hammer on his anvil (using another hammer? where did that one come from?), or turning a drill bit on his lathe.

    Learning how to select and use the existing tools (especially the ones already built into the language) is a fundamental skill for a programmer, and becoming adept at implementing such properly is every bit "sharpening your coding skills."

    In my humble opinion, your time and energy would be better invested in practicing writing clean, efficient application code, using the basic toolkit you've already selected by choosing to code in Perl.


    The way forward always starts with a minimal test.