I realize why it does that. I'm asking whether I can have something
higher-level that works for objects on the abstraction level where
one usually looks at an object.
P.S. I would know, because it would say HASH instead of Some::Package.
On Feb 23, 2006, at 22:42, Octavian Rasnita wrote:
F
From: "Johannes Ernst" <[EMAIL PROTECTED]>
> That just changes the amount of whitespace. Here is an example of
> what I want:
>
> Some::Package {
> a => 'a value',
> b => 12,
> c => Other::Package {
> x => 34
> }
> }
>
Data::Dumper prints it exactly this way if $var is
That just changes the amount of whitespace. Here is an example of
what I want:
Some::Package {
a => 'a value',
b => 12,
c => Other::Package {
x => 34
}
}
instead of what Data::Dumper gives me, which seems to be:
p is $VAR1 = bless( [
bless( {
'c' => 3,
'a' =>
From: "Johannes Ernst" <[EMAIL PROTECTED]>
> PHP knows print_r -- which prints a data structure hierarchically,
> and is very useful for debugging.
> e.g.
> echo "Variable a is " . print_r( $a, true ) . "\n";
>
> Is there something similarly easy in Perl?
>
> It appears that Data::Dumper
Jack Daniels (Butch) wrote:
> It's driving me bonkers and can't afford any more psychiatic bills. The data
> is a saved .txt file when viewing from a website. The vendor will not give
> us an actual file even though we payed a montly fee for use of the database.
> I have around 5000 records that ne
PHP knows print_r -- which prints a data structure hierarchically,
and is very useful for debugging.
e.g.
echo "Variable a is " . print_r( $a, true ) . "\n";
Is there something similarly easy in Perl?
It appears that Data::Dumper may be of help, but I have not been able
to figure out how
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of
> Tom Phoenix
> Sent: Thursday, February 23, 2006 2:43 PM
> To: Ryan Frantz
> Cc: beginners@perl.org
> Subject: Re: Non-printing Characters
>
> On 2/23/06, Ryan Frantz <[EMAIL PROTECTED]> wrote:
>
> >
On 2/23/06, Ryan Frantz <[EMAIL PROTECTED]> wrote:
> I've got a few reports that are generated by a third-party app that we use
> and the raw report files include incomprehensible strings at the beginning
> of each page like so:
>
> &k2S&l6D
I wonder whether those are supposed to be escape sequ
Thanks everybody pointing out that B is an internal Perl namespace.
Duh! I will refrain from comment on whoever made that choice ...
In addition, I realized that the order in which 'use' and 'use
fields' statements are made is very much significant; if one gets it
wrong, mysterious things h
I've got a few reports that are generated by a third-party app that we use and
the raw report files include incomprehensible strings at the beginning of each
page like so:
&k2S&l6D
Sometimes there are control characters (shown below as normal text i.e. ^D~Q)
throughout the file:
1รบรน^E~I/~X/
Responding to your references to modules, we haven't used them because we
can't count on them being there. Obviously my problem, not yours. =)
Thanks for the response.
- Bryan
> Hi Bryan
>
> It's a bit lengthy, but I hope it motivates you a bit to look around...
>
>> You mention larger
Bryan Harris am Donnerstag, 23. Februar 2006 16.41:
Hi Bryan
It's a bit lengthy, but I hope it motivates you a bit to look around...
> You mention larger projects, and I've heard about "reusable code"... Is
> that generally done by copy/paste into the script you're working on?
Code copied&pas
Good advice, Hans and Timothy, I'll try to start using it.
One quick follow-on question (I promise only one!):
You mention larger projects, and I've heard about "reusable code"... Is
that generally done by copy/paste into the script you're working on? Or is
there a way to somehow "compile" li
Hans Meier (John Doe) am Donnerstag, 23. Februar 2006 13.07:
[...]
sorry for replying to myself...
> > The script is only extracting the first line of the heading..
>
> Yes, with every loop trough @lines, you overwrite your variables $title to
> $dewey.
this doesn't matter since you print the cont
Jack Daniels (Butch) am Donnerstag, 23. Februar 2006 10.30:
> It's driving me bonkers and can't afford any more psychiatic bills. The
> data is a saved .txt file when viewing from a website. The vendor will not
> give us an actual file even though we payed a montly fee for use of the
> database. I
It's driving me bonkers and can't afford any more psychiatic bills. The data
is a saved .txt file when viewing from a website. The vendor will not give
us an actual file even though we payed a montly fee for use of the database.
I have around 5000 records that need to be converted to MARC catalogin
The main reason is that it will catch errors in your code that vanilla
Perl will not. As an example, if you accidentally add a typo into one
of your variables, Perl won't care. It will just create the variable on
the fly and assume you know what you're doing. Especially with larger
projects, th
17 matches
Mail list logo