Questions tagged [data-dumper]

Data::Dumper is a Perl library for generating stringified representations of data structures, suitable for both printing and eval.

Data::Dumper is a Perl library for generating stringified representations of data structures, suitable for both printing and eval.

92 questions
0
votes
1 answer

perl looping and writing to csv?

In this program I have function inside function Without sub function "output" the program is looping file and printing in the csv file. But with sub function "output" it is not looping and it is writing only the first type to the csv file? sub…
0
votes
1 answer

Inserting two arrays into columns of a html table perl

I have two arrays that have related data. I need to insert them into a html table. I am accessing these arrays from a different program by using modules which I found out by searching the forum. package My::Module; use strict; use warnings; use…
venkatvg
  • 13
  • 8
0
votes
2 answers

Perl - Hash reference structure of variable depth

I have a question I am hoping someone could help with. I have a tab-delimited text file called FILE.txt: (note two of the ages are missing): BOY Fred Smith 56 BOY David Jones 18 GIRL Anne Roberts BOY Fred …
yonetpkbji
  • 1,019
  • 2
  • 21
  • 35
0
votes
2 answers

Perl Issue putting data into array reference (with perl URI)

I have the following code: #!usr/bin/perl use strict; use warnings; use URI qw( ); my @insert_words = qw( HELLO ); my $newURLs; while ( my $baseURL = ) { chomp $baseURL; my $url = URI->new($baseURL); my $path = $url->path(); for…
yonetpkbji
  • 1,019
  • 2
  • 21
  • 35
0
votes
1 answer

Perl and Data::Dumper::HTML + cgi

First of all my english is not the best, thank you for understanding. A portion of the code principal index.cgi my ($url, $params) = split(/\?/, $ENV{'REQUEST_URI'}); my @pairs = split(/&/, $params); foreach $pair (@pairs) { my ($name,…
opmeitle
  • 195
  • 6
  • 19
-1
votes
1 answer

Extract information from Dumper

How to extract partial information from Dumper data with a key? $VAR1 = { 'fruit' => 'apple', 'uniqueID' => 'red' }; $VAR2 = { 'fruit' => 'apple', 'uniqueID' => 'green', }; Expected output key…
-1
votes
2 answers

Perl Data Dumper Specifiers Explanation

Observing the output of Data::Dumper, the specifiers ($VAR1, "", ;) are not explained in the CPAN documentation. What is the purpose for the $VAR1? What is the purpose for the semicolon? What is the purpose for the quotations? Here is my…
Minimalist
  • 963
  • 12
  • 34
-1
votes
1 answer

print out email on terminal using data::dumper

I am not understanding how to use Data::Dumper even after reading the Perl doc and looking at other scripts in git. I see lots of examples online dealing with hashes, but I didn't think that quite fit with what I need to do. I am creating a script…
Jes
  • 75
  • 7
-1
votes
1 answer

Reading/dumping a perl hash from shell

I have a read-only perl file with a huge hash defined in it. Is there anyway for me to read this perl file and dump out the hash contents? this is basic structure of the hash within the file. %hash_name = { -files => [ '', …
newbie
  • 1
  • 2
-1
votes
1 answer

Perl DNS Validation using modules Net::DNS, Data::Dumper and Getopt::Long errors

#!/usr/bin/perl # S Validation Script use strict; use Net::DNS; use Data::Dumper; use Getopt::Long; $| = 1; my $USAGE = "$0 --file "; my $input_filename = ""; GetOptions("--file=s" => \$input_filename) or die $USAGE; if…
technerdius
  • 253
  • 3
  • 6
  • 16
-1
votes
2 answers

Read perl dumped data into C#

How to read Perl Dumped data in C#? I write a hash structure into a text file from Perl script. I need to read the hash structure in C#. How do I do it? Thanks :)
-1
votes
1 answer

Querying multiple times in Oracle using perl returns only the first query

Note: I have corrected the variable differences and it does print the query from the first set but it returns nothing from the second set. If I use the second set only it works. In the code below, I have some_array which is array of array the array…
mysteriousboy
  • 159
  • 1
  • 7
  • 20
-2
votes
3 answers

Parse report in blocks to CSV

I have lots of data dumps in a pretty huge amount of data structured as follow Key1:.............. Value Key2:.............. Other value Key3:.............. Maybe another value yet Key1:.............. Different value Key3:..............…
Rafareino
  • 2,515
  • 1
  • 19
  • 26
-2
votes
1 answer

Parsing message header with perl

My programming skills are intermediate at best, and I have not used Perl much before, so please reply gently. I'm trying to extract the original "from address" (NOT the "envelope-from address") from inbound emails. I parse inbound emails that pass…
sanitycheck
  • 286
  • 3
  • 16
-3
votes
1 answer

Can this "Modern Perl" Data:Dumper example be fixed?

The code is from "Modern Perl Fourth Edition", "Book version P1.0--October 2015". It's in chapter 3 - page 81 of the paper version, under the heading "Debugging Nested Data Structures". The book is also available in a PDF version that can be…
grjash
  • 176
  • 2
  • 8