1. tracing SQL calls with a stack dump - Perl DBI
2. trace sub's calls stack to STDERR (for cgi debugging)
Hi, I am developing a web application framework (based on template toolkit). Its design is Object Oriented, so a lot of $self->foobar(); kind of methods are called. I'd like to trace these calls to a log file or STDERR (with Carp perhaps?) so they get to Apache's error log. All my classes are subclasses of a Object.pm package, so if I can change the method invocation there to write a debug statement, I am all set. Any hints ? TIA henq
3. printing out the values of variables in a previous stack frame using perl debugger
4. Insideous non-breaking space, why can't it be called a whitespace \s and be done with it?
I'm not sure how the below sample will look under your newsreader.
I am using Agent. I usually don't look at raw nntp messages.
I made the mistake of cut n' pasting a sample picked up on this
group, into Notepad to try it out. It should have worked but didn't.
Unfortunately, the sample was from Google news reader.
As I went back and toggled Agent into 'raw', the =A0 showed up of
course. Interrestingly, Notepad and Word shows it as A0 & 7f = 20 = ' '.
This didn't bother me too much but got me thinking.
All my instincts are telling me not to ask this because A0 > 7F,
and A0 is distinct in meaning but here goes.
As far as I know, Perl has no significant meaning for A0,
its just another character.
Just for this specific character, why can't it be a whitespace
at least in context of regex's and possibly when the source is
parsed?
As it is now, parsed regex's allow embedded A0, but all other
places generate "unknown character in source" error.
And I'm not sure that a Word edited source cannot contain
embedded non-breaking spaces.
End of stupid question..
-sln
-----------
use strict;
use warnings;
my @strings = (' ', ' ');
for my $str (@strings)
{
print "\nstring = '$str'\n";
print "all whitespaces\n" if ($str =~ /^\s+$/);
for (map {ord $_} split //,$str) {
printf "%02x & 0x7f = %02x\n", $_, ($_ & 0x7f);
}
}
print "\n";
if ( "some_text" =~ /
^ # begin string
.* # anything or nothing
$ # end string
/x )
{ print "matched\n" }
else
{ print "didn't match anything/nothing\n" }
print "\n";
if ( "some_text" =~ /
^ # begin string
.* # anything or nothing
$ # end string
/x )
{ print "matched\n" }
else
{ print "didn't match anything/nothing\n" }
__END__
Output:
c:\>emp>perl jj.pl
string = ' '
20 & 0x7f = 20
a0 & 0x7f = 20
20 & 0x7f = 20
a0 & 0x7f = 20
20 & 0x7f = 20
string = ' '
all whitespaces
20 & 0x7f = 20
09 & 0x7f = 09
20 & 0x7f = 20
20 & 0x7f = 20
didn't match anything/nothing
matched
c>\temp>
5. Why isn't Tk804.025 called Tk844.025?
6. Why does dir produce different results when called from Perl
That is, why does the output differ between:
perl -e "print join(\"\n\",@{[`dir`]});"
and
dir | perl -pne ""
7. Need help in using Base 64 encoding decoding for imagesu - Perl
8. Web based admin using PERL and CGI
Hey all, I am thinking I'd like to "browserize" a number of simple functions, please correct me if I understand what I'd need to do. Lets say I want to run a pkginfo command on my web server, and return teh results to a browser, I'd need to call a ksh script from a CGI module? So I'd make a form in perl, where I could button select which packages I wanted to see, then pass those package names so in effect on the back end I could do a pkginfo |grep <FROM_WEB_FORM> So I can write the ksh easy, my question is how to call it and return the results I guess. I am sure this is all documented, and I know there's been a lot of talk of calling seperate programs from perl, does this fit? Can someone point me in the right direction for documentation on how to do this. Basically I need to be able to call ksh scripts and pass them operands, and parse the results into a list/form for a browser. Thanks, Jason