you have a question on how to do something in Perl, or
you need a Perl solution to an actual real-life problem, or
you're unsure why something you've tried just isn't working...
then this section is the place to ask. Post a new question!
However, you might consider asking in the chatterbox first (if you're a
registered user). The response time tends to be quicker, and if it turns
out that the problem/solutions are too much for the cb to handle, the
kind monks will be sure to direct you here.
Hash obtained from excel file saved in CSV format. Need to obtain output based on hash keys and corresponding values. How to read contents of various CSV file with data stored in various sheets? Now, I'm able to read data from sheet1 and store in a hash.
In the process of setting up a new development environment for myself and ran into a minor snag.
Part of my setup includes Dist::Zilla and a slew of plugins for it. I got to the Subversion plugin which failed complaining there was no SVN::Client on the system. I searched CPAN from the CPAN shell and noticed:
I'm working on a perl scraper using www::mechanize, but need it to execute a line of jQuery code to pop information about an element on a page. I could either use jquery or not, it doesn't really matter, I just figured jquery might be a bit more concise. Basically, the code I want perl to click is this, so how would I go about doing that?
By definition, the handle_char part should be able to read all the non-markup text into one String. For example, here it should read "LT Issuer Rating". The above line repeated hundreds of times in the xml file, and it works correctly for most of the times. However, there is one exception that it reads "LT" and " Issuer Rating" into two separate Strings.
Here're a few attempts I tried:
1) I tried checking that particular line using Emacs hexl mode, and didn't find any unusual character in that line.
2) I tried cutting the problematic part out, and create a new xml file containing only that part. It works correctly.
3) I tried creating a copy of the whole file, by removing all the non-printable characters (which basically removes the leading spaces before xml tags and makes the file shorter). This does solve the problem.
4) I tried only removing all the non-printable characters in that problematic line. This time Perl reads "LT Iss" and "user Rating".
Could anyone help to identify if this is a Perl XML parser module internal bug when handling large amounts of data? Or is this something wrong in my xml file? Thanks a lot!
I guess this is more of an HTML question than Perl, but
I've read the detailed desctiption of the cgi.pm -disabled switch (used on an input text box) and all it says is it prevents the user from clicking into the box. Which is exactly what I need.
But IN ADDITION, the param seems to vanish from the cgi returned from the page? That seems particularly undesirable, since now I'm having to push it in with a cgi->hidden to get the dataset proper again.
Is the disappearing param an actual built-in functionality of disabled, or is something else going on?
-disabled is also one of those oddball switches where it's specification is undefined.
Some pages suggest you use -disabled => 1,
others -disabled => 'on',
and others say -disabled,
is sufficient. Aggregated docs are unclear.
TY and happy Monday.
Hi Perl Monks. Got another one to lay on you:
In the 'Intermediate Perl' book, it is discussing the Regexp::Assemble module.
After the brief discussion of how it optimizes the expression it says 'If you are using v5.10 or later, Perl already does this for you.'
I did a quick (not exactly comprehensive) script to check what that statement was on about
my $re = Regexp::Assemble->new;
for('blah', 'bleh', 'chicken', 'woofie', 'snake', 'snakes', 'woofies',
my $newre = qr/blah|bleh|chicken|woofie|snake|snakes|woofies|chicken-w