Hi,
I would consider utilizing Solr.
http://en.wikipedia.org/wiki/Apache_Solr
http://wiki.apache.org/solr/ExtractingRequestHandler
http://tika.apache.org/
Chris
#!/usr/bin/perl
use strict;
use warnings FATAL => qw/ all /;
use List::MoreUtils qw/ any /;
use Data::Dumper;
# construct hash
my %hash;
push @{$hash{key1}}, $_ for ( 1 .. 4 );
push @{$hash{key2}}, $_ for ( 5 .. 9 );
# process hash
my $var1 = 1;
while ( my ( $key, $list ) = ( each %hash ) )
{...
...do the following in my scripts:
use lib $ENV{LIB} // die 'required environment variable LIB not defined';
Another alternative could be to execute a setup script, which could prompt users to supply the path to the lib, or grep the system for /lib/*.pm, which is then saved to disk for use...
Very interesting to hear that you guys have experienced similar issues to myself on a shared server. Modules have gone missing in the past and I have been told it must be a bug in my script. These were very stressful times.
With regards to MIME::Lite, it is suggested in the documentation that...
Hi,
With this in mind, I might suggest XML::Simple ( http://search.cpan.org/~grantm/XML-Simple-2.20/lib/XML/Simple.pm ), simply because it will parse any XML structure into a Perl data structure from a single method call. However, it will likely require some fiddling around with the options...
Hi,
@spewn:
You are describing "references". The Perl docs explain references well ( http://perldoc.perl.org/perlref.html ).
With regards to counting, i'm interested in your approach which resulted in a value of 1 being returned. A reference in scalar context is simply a string representing...
Update to suit your requirements:
#! /usr/bin/perl
use strict;
use warnings;
use IO::File;
use Text::CSV;
use XML::Writer;
my $groups_node = 'RESULT';
my $group_node = 'item';
my ($csv_input_path, $xml_output_path) = @ARGV;
##########
# create objects.
my $xml_output_fh = IO::File->new(...
Last thing,
I hadn't read your prints properly, and noticed you are indeed making use of @fields, therefore ignore my comments regarding. My example generates XML in the same format you desire (although no sorting).
Chris
I had nothing better to do therefore thought I would write an example :-D. Depending on the situation, my usual preference is to use Template Toolkit to generate XML / handle i.e. escaping myself, but XML Writer does the job here.
#! /usr/bin/perl
use strict;
use warnings;
use IO::File;
use...
Hey,
Your code needs some critical adjustments.
The key issue you identified is caused by the fact that you are passing an undefined value to the trim() function. The codes current logic suggests that it would be impossible for a defined value ever to be passed to the trim() function.
While...
Hi,
Your issue isn't entirely clear:
- Where are the values of 10000 and 100000 coming from. Even then, there is nothing in your code to cause issues around these specific values.
- Specifically, what is the "error in printing minimum value".
However, I believe the following could potentially...
I would probably make use of HTML::TableExtract to break the html up before considering using other methods i.e. regexes to extract the specific elements. An alternative or combo would be to use HTML::TreeBuilder / HTML::Element which have html lookdown and address methods. From the supplied...
Last update. Looks like its to do with my method of using the 'or' operator to ensure the value defaults to "12". My question is then, how do I set a default value in one line.
Thanks,
Chris
Hello,
Every time I use a query param with the value 11 or 2011, its automatically converted to 13 or 2013. In fact anything below 12 or 2012 is converted. Example:
// /test.php?Year=11
<?php
$year = $_GET['Year'] | '12';
echo "$year";
?>
I'm assuming its recognizing that the value is a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.