Could you please give me some suggestions on how to parse HTML in Perl? I plan to parse the keywords(including URL links) and save them to a MySQL database. I am using Windows XP.
Also, do I first need to download some website pages to the local hard drive with some offline Explorer tool? If I do, could you point me to a good download t...
I am new to Perl and I have a problem that's very simple but I cannot find the answer when consulting my Perl book.
When printing the result of
Dumper($request);
I get the following result:
$VAR1 = bless( {
'_protocol' => 'HTTP/1.1',
'_content' => '',
'_uri' => bless( do{\(my $o = 'http://myaw...
I'm trying to setup a Perl development environment on my Mac laptop and have been having a really hard time getting it working. I thought I had everything configured correctly but when I try to run a sample script it is reporting errors with the DBI module and can't access the DB.
Here is what is reported in the Apache error logs:
[Fri...
I have an SQL file which will give me an output like below:
10|1
10|2
10|3
11|2
11|4
.
.
.
I am using this in a Perl script like below:
my @tmp_cycledef = `sqlplus -s $connstr \@DLCycleState.sql`;
after this above statement, since @tmp_cycledef has all the output of the SQL query,
I want to show the output as:
10 1,2,3
11 2,4
Ho...
I am looking for the pure Perl module for creation of the image file. I went through internet and found some modules GD, Imager, Prima-1.28 but these are all contains 'C' (.c) file and (.h) files.
...
The user enters a product code, price and name using a form. The script then either adds it to the database or deletes it from the database. If the user is trying to delete a product that is not in the database they get a error message. Upon successful adding or deleting they also get a message. However, when I test it I just get a bl...
I am just starting with perl and would like some help with arrays please.
I am reading lines from a data file and splitting the line into fields:
open (INFILE, $infile);
do {
my $linedata = <INFILE>;
my @data= split ',',$linedata;
....
} until eof;
I then want to store the individual field values (in @data) in and array so that the ar...
I just recently started out on Moose and its a great OO framework not only to use but also to learn new OO concepts. One of the things I wanted to do was to do error reporting from perspective of caller during object creation. I saw that Moose has the module Moose::Error::Croak which tells Moose to override the default error reporting by...
I'm trying to install Moose (a CPAN module) on my Macbook Pro. It finds a dependency on Sub-Name, and when it tries to install this, gets the following error messages. Any idea as to how I can cure this?
XMATH/Sub-Name-0.04.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /opt/local/bin/perl "-MExtUtils::Command:...
Date::Simple objects display this behavior, where $date++ returns the next day's date.
Date::Simple objects are immutable. After assigning $date1 to $date2, no change to $date1 can affect $date2. This means, for example, that there is nothing like a set_year operation, and $date++ assigns a new object to $date.
How can one custom-d...
print "$_", join(',',sort keys %$h),"\n";
It's giving me an error below:
Use of uninitialized value in string at missing_months.pl line 36.
1,10,11,12
this print statement is present in a for loop as below:
foreach my $num ( sort keys %hash )
{
my $h = $hash{$num};
print "$_", join(',',sort keys %$h),"\n";
}
...
I'm looking for a way to convert signals connections to a simple scheme or graph.
Let's say I have 2 components with 2 line/signals around them:
component A:
input - S1
output - S2
component B:
input - S2
output - S1
This will be the input data file, and the output will be a scheme that shows it as 2 blocks with connecting line...
I sometimes need to search code for patterns in a way that goes beyond the regex capabilities of Visual Studio (e.g. patterns that depend on what was seen previously in the file or on the contents of other files). So I use Perl to analyze the source and output matching lines, along with the file name and line number.
Since this is the ...
I'm not thrilled with the argument-passing architecture I'm evolving for the (many) Perl scripts that have been developed for some scripts that call various Hadoop MapReduce jobs.
There are currently 8 scripts (of the form run_something.pl) that are run from cron. (And more on the way ... we expect anywhere from 1 to 3 more for every f...
I keep getting a crash on the mt-wizard.cgi script that returns: "script failed to send data".
I'm not sure what the issue is, and whether it is because of movable type of perl/windows.
Any insight is appreciated.
...
hi,
I have a variable which stores the path on Windows. I want to replace all the \ with / in the path.
for eg. $path = C:\Users\scripts.ps1
Am new to Perl and tried something like
$path = s/\\////
But it didnt work. can you please help me out....
...
I'm the author of an Open Source kiosk management system, Libki. The current version, though functional, was very much a learning experience for me. I'm working on a complete rewrite and am having a hard time deciding what protocol to use.
The server will be written in PHP or Perl. Most likely PHP because I need to support some uncommon...
Since there is for almost everything a module and it is repeatedly said that we should not reinvent the wheel and since I do not write modules for CPAN I have no need to use OO.
But my question is, is professional Perl code mainly written in OO-style?
...
I am working on a project where I am generating some code/scripts (specifically Perl scripts) via Java and Freemarker. I have it working for now, but was wondering if there was some way to change the default variable delimiter ($) in Freemarker?
Or is there a different Java template engine that would use a variable delimiter more suita...
I've moved a Perl CGI app from one web host to another. Everything's running fine except for Template Tookit which is giving the following error:
"Template process failed: undef error - This shouldn't happen at /usr/lib/perl5/5.8.8/CGI/Carp.pm line 314."
The templates are working fine on the other web host. I've set the DEBUG_ALL flag ...