I thought I remembered something like this in my Perl Hacks book...
Hack #74 says to use Devel::TraceUse
Like this:
perl -MDevel::TraceUse myscript.pl
And gives output something like this:
Modules used from myscript.pl:
1. strict 1.03, myscript.pl line 2 [main]
2. warnings 1.03...
Which Database server are you using? I'm guessing either SQL Server or SyBase.
I was reading the DBI documentation (http://search.cpan.org/~timb/DBI-1.605/DBI.pm#Handling_BLOB_/_LONG_/_Memo_Fields). Apparently you can set $dbh->{LongReadLen} or $dbh->{LongTruncOk} (to truncate long data)...
Try something like this to see what I was talking about:
$line = 'hello(()())';
@captures = $line =~ /([\(\)]*)/g; #added the "g" flag for global
print "$_\n" foreach (@captures);
I got to my Unix box and tested it - I see what was happening. It was the fault of the star, I believe. The star says "match zero or more". The letter "h" in your string "hello" matches "zero or more" parenthesis, so $1 was '' - it matched the "h" but didn't capture anything. The plus sign...
Your second one should be printing to STDOUT instead of OUTF if you want to see it on the screen. Are you seeing multiple "TESTING" lines appear on your screen? If so, something seems a little off - Your query is "select Audio_Data from English_English where Audio_Name = 'ENG_2.WAV'" - I would...
Maybe you have done this, but I would make sure you are getting something returned from your database query.
Maybe inside your while loop, inside your foreach loop, do:
while(@first = $sth->fetchrow_array) {
foreach $field(@first) {
print STDOUT "TESTING\n";
print OUTF...
Does the user that the http server is using have permissions on the files or the directory that the files are in? Do all of the files get the exact same time and size=0?
There could be a problem with this line:
my ($day, $month, $day, $time, $year) = split(/ /, $j);
You are using $day twice.
I also prefer to use POSIX and then get my date string like this:
use POSIX;
my $md = strftime("%d %b %H:%M", localtime($m));
Just a preference though
Sounds like you need the strftime function?
Not exactly sure how you are handling this date, but if you had it in a variable called createdDate, then try this:
createdDate.strftime("Created Date: %m/%d/%Y at %I:%M%p")
What OS are you trying to build DBD::mysql on? Is the MySQL client already installed and working (outside of perl)? If so, where are the MySQL libraries (ex. /usr/local/mysql/lib)? You may have to tell the Makefile.PL where the MySQL libraries are located.
The "Referenced Symbol not found"...
Have you checked out the Lingua::EN::Numbers module? (Assuming you need English)
use Lingua::EN::Numbers qw(num2en num2en_ordinal);
my $x = 234;
my $y = 54;
print "You have ", num2en($x), " things to do today!\n";
print "You will stop caring after the ", num2en_ordinal($y), ".\n"...
I believe the link I gave you is a binary compiled from the GPL source.
http://users.tpg.com.au/naffall/htmldoc.html
He mentions this:
- this does not seem to be a 21 day trial.
Okay - I understand now.
I'm guessing you do not have C-compilers or Nmake or anything like that installed.
Maybe this link:
http://users.tpg.com.au/naffall/htmldoc/HTMLDoc1.8.24.zip
That is the binary install, so no compile is needed.
or search google...
You need to install the latest DBI module first. Then install the DBD::(Your Database Flavor) module. The install for DBI will not install other DBD:: modules - unless you have some kind of pre-built packages.
When you write your code, you only need a "use DBI;
Are you referring to the software here?
www.htmldoc.org - if so, is that written in perl?
Or the module HTML::HTMLDoc?
If you need help compiling the module, are you in windows or Unix? Here's a FAQ on installing modules on Windows:
http://www.tek-tips.com/faqs.cfm?fid=1687
If you're...
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.