Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: output of dumper

by tcf22 (Priest)
on Mar 23, 2004 at 22:27 UTC ( #339231=note: print w/ replies, xml ) Need Help??


in reply to output of dumper
in thread regex issue

First off $9YT isn't a valid valiable name. Variables can start with letters and underscores only. Using Data::Dumper should get almost what you want. There are no my's and i'm not sure how to get them, or if it is even possible with Data::Dumper.

use strict; use warnings; use Data::Dumper; my $ER = 34; my $YT = 44; my $EE = 66; print Data::Dumper->Dump([$ER, $YT, $EE], [qw(ER YT EE)]); __OUTPUT__ $ER = 34; $YT = 44; $EE = 66;

- Tom


Comment on Re: output of dumper
Download Code
Replies are listed 'Best First'.
Re: Re: output of dumper
by hardburn (Abbot) on Mar 24, 2004 at 21:12 UTC

    First off $9YT isn't a valid valiable name

    It is if you do enough tricks.

    $ perl -MData::Dumper -le '$f = "9YT"; $$f = "foo"; print Data::Dumper +::Dumper(\%main::)' $VAR1 = { # snip '9YT' => *{'::9YT'}, # snip };

    With symbol table lookups and symbolic refs, pretty much anything is possible in a Perl variable name. I don't know of a way to get lexicals to do this, though.

    ----
    : () { :|:& };:

    Note: All code is untested, unless otherwise stated

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://339231]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (17)
As of 2015-07-29 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (265 votes), past polls