[22355] in Perl-Users-Digest
Perl-Users Digest, Issue: 4576 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Feb 17 11:06:08 2003
Date: Mon, 17 Feb 2003 08:05:08 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 17 Feb 2003 Volume: 10 Number: 4576
Today's topics:
Re: (not 1) and (!1) yield zero length string <REMOVEsdnCAPS@comcast.net>
Re: (not 1) and (!1) yield zero length string <sfandino@yahoo.com>
Re: (not 1) and (!1) yield zero length string <REMOVEsdnCAPS@comcast.net>
Re: call subroutines from a different file <perl-dvd@darklaser.com>
Re: Correct way to check for errors during readline()? <scriptyrich@yahoo.co.uk>
Re: DB2 Connect and DBD::DB2 (Wonderinguy)
Re: Error in Perl Query (Jack Cane)
Re: Error in Perl Query (Jack Cane)
How to trim a field in a data line? (SYeats)
Re: How to trim a field in a data line? <josef.moellers@fujitsu-siemens.com>
Re: join or .= -- which is faster? <REMOVEsdnCAPS@comcast.net>
Re: JPG RGB to JPG CMYK (Helgi Briem)
Re: one liner in command line <noemail@nowhere.net>
Re: one liner in command line <josef.moellers@fujitsu-siemens.com>
Re: one liner in command line <chang0@adelphia.net>
Re: one liner in command line <graham.drabble@lineone.net>
Re: Perl dies silently. (tî'pô)
Perl program for web topology? <mikmoila@shire.ntc.nokia.com>
PL_defstash and segfault (for geeks only) <pavel@gingerall.cz>
Reading Nested HTML Tables <KevinMyers@austin.rr.com>
Re: Reading Nested HTML Tables <dont@want.spam>
Returning the field list from DBI (Jason Singleton)
Re: Returning the field list from DBI <nobull@mail.com>
Re: Returning the field list from DBI (Sara)
Re: Sharing Variables and Functions Across Modules (Tad McClellan)
Re: split and join (Drew Myers)
Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
Re: use lib Apache->server_root_relative('lib/perl'); <Pop@goesthe.net>
Re: Variation on iterating through a string <perl-dvd@darklaser.com>
Re: Win32::NetResource::GetSharedResources <sapbasis2003@netscape.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 17 Feb 2003 07:58:17 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: (not 1) and (!1) yield zero length string
Message-Id: <Xns93255B36685Esdn.comcast@216.166.71.239>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
Salvador Fandiño García <sfandino@yahoo.com> wrote in
news:3E50C3DF.7030801@yahoo.com:
> 0 or '' ?
>
> it depends on the context so Perl tries to satisface both and
returns
> an schizophrenic value (being both 0 and '') that unfortunatelly
> prints as ''.
I always thought that "not(some_true_value)" always returned ''.
What leads you to believe that it's a dual-mode scalar? And if it
is, why would Perl return such a scalar? What's wong with just ''?
- --
Eric
print scalar reverse sort qw p ekca lre reh
ts uJ p, $/.r, map $_.$", qw e p h tona e;
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32) - WinPT 0.5.13
iD8DBQE+UOpfY96i4h5M0egRAj97AKDYY9t68ObnIqZEdHJA1pahWaCt3ACgtPZ+
NW6hRJ7hoq4zbzELKZ7icAw=
=neBo
-----END PGP SIGNATURE-----
------------------------------
Date: Mon, 17 Feb 2003 15:31:07 +0000
From: =?ISO-8859-1?Q?Salvador_Fandi=F1o_Garc=EDa?= <sfandino@yahoo.com>
Subject: Re: (not 1) and (!1) yield zero length string
Message-Id: <3E51003B.2000205@yahoo.com>
Hi,
Eric J. Roode wrote:
> I always thought that "not(some_true_value)" always returned ''.
> What leads you to believe that it's a dual-mode scalar? And if it
> is, why would Perl return such a scalar?
try this code:
use warnings;
print(not(1)+2); # no warning
print(''+2); # warning!
> What's wong with just ''?
if you are using numbers it is not very consistent because
!0 ==> 1 # ok
!1 ==> '' # most people would expect 0
Bye,
- Salva
------------------------------
Date: Mon, 17 Feb 2003 09:06:06 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: (not 1) and (!1) yield zero length string
Message-Id: <Xns932566B4F240Esdn.comcast@216.166.71.239>
Salvador Fandiño García <sfandino@yahoo.com> wrote in news:3E51003B.2000205
@yahoo.com:
> if you are using numbers it is not very consistent because
>
> !0 ==> 1 # ok
> !1 ==> '' # most people would expect 0
Ah, that makes sense. Thanks.
--
Eric
print scalar reverse sort qw p ekca lre reh
ts uJ p, $/.r, map $_.$", qw e p h tona e;
------------------------------
Date: Mon, 17 Feb 2003 14:39:04 GMT
From: "David" <perl-dvd@darklaser.com>
Subject: Re: call subroutines from a different file
Message-Id: <cu64a.15$F6.3665@news-west.eli.net>
"Daniel Bird" <dbird@no-spam.sghms.ac.uk> wrote in message
news:3E48D3CF.1050208@no-spam.sghms.ac.uk...
> Dear all,
> I wish to call subroutines from a 'file'. eg:
>
> script1.pl calls subroutine 'printlogo' from the file 'subroutines'.
Can
> anybody assist me in what is probably quite simple?
try
require subroutines.pl;
inside your script1.pl, and make sure you have a 1; at the bottom of
your subroutines.pl code.
Regards,
David
------------------------------
Date: Mon, 17 Feb 2003 13:39:43 +0000
From: Rich <scriptyrich@yahoo.co.uk>
Subject: Re: Correct way to check for errors during readline()?
Message-Id: <b2qokm$vel$1@news7.svr.pol.co.uk>
Benjamin Goldberg wrote:
> Rich wrote:
>>
>> Hello
>>
>> perldoc -f readline states:
>>
>> "In scalar context, each call reads and returns the next line,
>> until end-of-file is reached, whereupon the subsequent call
>> returns undef."
>>
>> But what happens if an error occurs during a read? Does readline
>> return undef in this scenario as well?
>
> It depends on the version of perl, and on error. In perl5.8.0, if errno
> is EAGAIN or EINTR, perl checks if any signals have come in, dispatches
> the perl signal handlers, then tries the read call again.
>
> For other errors ... I believe that it will return whatever data has
> been read so far, and then the next call will be undef, just as if you'd
> hit the end-of-file.
>
>> I'm presuming you therefore have to test $! to determine whether an
>> error condition or end of file has been reached?
>
> Yes, I suppose so. Also, since $! only is meaningful *after* an error
> has occured (that is, it may have garbage in it after a successful
> operation), you have to set it to zero before you make your readline
> call.
>
> PS: In almost all situations where you'd be worried about errors while
> reading, you'd probably want to use sysread() instead of readline(), and
> do the newline handling yourself.
>
I'll go for the reset $! and test it option for now - I'm not too paranoid
but it certainly doesn't make sense to ignore read errors.
Thanks very much for the helpful reply,
--
Rich
scriptyrich@yahoo.co.uk
------------------------------
Date: 17 Feb 2003 07:39:53 -0800
From: wonderinguy@hotmail.com (Wonderinguy)
Subject: Re: DB2 Connect and DBD::DB2
Message-Id: <6950e82.0302170739.1d767545@posting.google.com>
Thanks to all of you.
I installed all the fix paks and it magically started working !
Darin McBride <dmcbride@naboo.to.org.no.spam.for.me> wrote in message news:<bGF3a.5413$na.233401@news2.calgary.shaw.ca>...
> Wonderinguy wrote:
>
> > I have a db2 connect server (windows) installed which is used to
> > connect to db2 on OS/390.
> > I have db2 connect personal edition on a Redhat 8.0
> > A perl script using DBD::DB2 use the datasource in the redhat computer
> > to query db2 on os/390.
> > When I go directly from linux computer(installed with db2 connect PE)
> > it works, but when I route it thru the DB2 Connect EE on a windows
> > server, it gives me segmentation fault.
> > How ever if I do db2 connect to db2 OS/390 via the db2 connect EE it
> > works. Just the perl DBD:DB2 application gives segmentaion fault.
> > Any ideas...
>
> I think your best bet is, unfortunately, to open a PMR with IBM. They'll
> probably need you to take a trace of the crashing application.
>
> I presume that if you do the same thing with the DB2 CLP, even routing
> through the Connect EE server, that everything works fine?
------------------------------
Date: 17 Feb 2003 07:40:14 -0800
From: jwcane@enw-ltd.com (Jack Cane)
Subject: Re: Error in Perl Query
Message-Id: <3f29ccb2.0302170740.2367e4ac@posting.google.com>
I tried the following. There are no errors, but I do not see my print
"<p>... statements. Nothing is written to the screen after "<p>Query
is "...
tks,
jwc
======================
use Win32::ODBC;
use CGI qw/:standard/;
my $querystring = "select LastName, FirstName, MidInitial, UserName
from MemberNames where MbrNr > 333 and mbrNr < 359";
print header;
print "<p>Query is ".$querystring."<p>";
$DSN = "LTmembers";
$SQL = $DBH->prepare($querystring);
print "<p> Success thus far1 </p>";
$result = $SQL->execute();
print "<p> Success thus far2 </p>";
"codeWarrior" <GPatnude@adelphia.net> wrote in message news:<2kQ1a.5207$jR3.2784859@news1.news.adelphia.net>...
> "Jack Cane" <jwcane@enw-ltd.com> wrote in message
> news:3f29ccb2.0302100641.69565e1a@posting.google.com...
> > I am using Perl-CGI to execute a SQL query against an ODBC database
> > table. Two form variables are used to modify the query. The queries
> > below both cause application errors in Perl.exe. Would appreciate any
> > hints toward a solution. Or could it be a faulty ODBC driver (EasySoft
> > Interbase driver)?
> >
> > ========================
> > First Query
> > ========================
> > my $row1 = param( "ROWSTART" );
> > my $row2 = param( "ROWEND" );
> >
> > my $querystring = "select LastName, FirstName, MidInitial, UserName
> > from MemberNames where MbrNr > ".$row1." and mbrNr < ".$row2;
> > ========================
> > Second Query
> > ========================
> > my $row1 = param( "ROWSTART" );
> > my $row2 = param( "ROWEND" );
> > my $Q1 = "select LastName, FirstName, MidInitial, UserName from
> > MemberNames where MbrNr > ";
> > my $Q2 = " and mbrNr < ";
> >
> > my $querystring = $Q1.$row1.$Q2.$row2;
>
> Better wrtiting your SQL Queries like this:
>
> $SQLSTMT = "SELECT LastName, FirstName, MidInitial, UserName from
> MemberNames where MbrNr > $row1 and mbrNr < $row2";
>
> $SQL = $DBH->prepare($SQLSTMT);
> $RESULT = $SQL->execute();
------------------------------
Date: 17 Feb 2003 08:00:20 -0800
From: jwcane@enw-ltd.com (Jack Cane)
Subject: Re: Error in Perl Query
Message-Id: <3f29ccb2.0302170800.e753734@posting.google.com>
I tried the following. Received the error message shown below.
==========================
use Win32::ODBC;
use CGI qw/:standard/;
my $querystring = q;
SELECT LastName, FirstName, MidInitial, UserName from MemberNames
WHERE MbrNr > ? AND mbrNr < ?
;;
my $statement_handle = $database_handle->prepare($querystring);
$statement_handle->execute( "333", "359" );
print header;
$DSN = "LTmembers";
print "<p> Success thus far </p>";
===============================
CGI Error
The specified CGI application misbehaved by not returning a complete
set of HTTP headers. The headers it did return are:
Can't call method "prepare" on an undefined value at
c:\inetpub\wwwroot\cgi-bin\LTselectNew-1.pl line 8.
===============================
tks,
jwc
Benjamin Goldberg <goldbb2@earthlink.net> wrote in message news:<3E4814AE.9E0AB0CF@earthlink.net>...
> Jack Cane wrote:
> >
> > I am using Perl-CGI to execute a SQL query against an ODBC database
> > table. Two form variables are used to modify the query. The queries
> > below both cause application errors in Perl.exe. Would appreciate any
> > hints toward a solution. Or could it be a faulty ODBC driver (EasySoft
> > Interbase driver)?
> >
> > ========================
> > First Query
> > ========================
> > my $row1 = param( "ROWSTART" );
> > my $row2 = param( "ROWEND" );
> >
> > my $querystring = "select LastName, FirstName, MidInitial, UserName
> > from MemberNames where MbrNr > ".$row1." and mbrNr < ".$row2;
> [snip]
>
> No, don't do it that way, do it this way:
>
> my $query_string = q;
> SELECT LastName, FirstName, MidInitial, UserName
> FROM MemberNames
> WHERE MbrNr > ? AND MbrNr <= ?
> ;;
> my $statement_handle = $database_handle->prepare($query_string);
> $statement_handle->execute( $row1, $row2 );
------------------------------
Date: 17 Feb 2003 05:20:40 -0800
From: simonyeats@hotmail.com (SYeats)
Subject: How to trim a field in a data line?
Message-Id: <81a67b5.0302170520.369ca1a9@posting.google.com>
Hi,
this is got me beat, i was wondering if anyone could help.
I wish to replace the 94th field in a semi-colon delimited text file
with a modified version of the same field.
This field can have values like A+ BB+ CCC-, and i wish to remove the
+/-, so its just A BB CCC.
I am trying something like
#!/bin/perl
while (<>) {
@F=split/;/;
$F[-18]=~ m/([A-Z]{1,3})/;
print "$1\n";
}
but i cant figure out how to do the replacement, just the match.
Any help much appreciated,
thanks Simon
------------------------------
Date: Mon, 17 Feb 2003 14:26:48 +0100
From: Josef =?iso-8859-1?Q?M=F6llers?= <josef.moellers@fujitsu-siemens.com>
Subject: Re: How to trim a field in a data line?
Message-Id: <3E50E318.F1026043@fujitsu-siemens.com>
SYeats wrote:
> =
> Hi,
> this is got me beat, i was wondering if anyone could help.
> I wish to replace the 94th field in a semi-colon delimited text file
> with a modified version of the same field.
> This field can have values like A+ BB+ CCC-, and i wish to remove the
> +/-, so its just A BB CCC.
> I am trying something like
> =
> #!/bin/perl
> =
> while (<>) {
> @F=3Dsplit/;/;
> $F[-18]=3D~ m/([A-Z]{1,3})/;
> print "$1\n";
> }
> =
> but i cant figure out how to do the replacement, just the match.
$F[-18] =3D~ s/[+-]$//;
$_=3Djoin(";", @F);
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
------------------------------
Date: Mon, 17 Feb 2003 07:34:01 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: join or .= -- which is faster?
Message-Id: <Xns932557193E1A9sdn.comcast@216.166.71.239>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
Benjamin Goldberg <goldbb2@earthlink.net> wrote in
news:3E506C3A.A1CF1212@earthlink.net:
> "Eric J. Roode" wrote:
> [snip]
>> # good
>> $/ = undef;
>> $str = <IN>;
>>
>> # better
>> {
>> local $/ = undef;
>> $str = <IN>;
>> }
>
> # best?
> $str = do { local $/; <IN> };
Maybe... it has the advantage of being only one line.
But "do" always makes me do a double-take. :-)
That's pretty good though, Benjamin. I hadn't thought of it.
- --
Eric
print scalar reverse sort qw p ekca lre reh
ts uJ p, $/.r, map $_.$", qw e p h tona e;
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32) - WinPT 0.5.13
iD8DBQE+UOSmY96i4h5M0egRAnj3AKDS5IthwkWEzrZpuQxSreHFoKlpywCdFfKC
PidwBuOxWWK2a/uv3rjeZg8=
=zNVN
-----END PGP SIGNATURE-----
------------------------------
Date: Mon, 17 Feb 2003 11:21:35 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: JPG RGB to JPG CMYK
Message-Id: <3e50c4b1.862048319@news.cis.dfn.de>
On Sun, 16 Feb 2003 18:10:11 +1100, Adam Ferla
<aferla01@postoffice.csu.edu.au> wrote:
>I was just wondering if there is a Perl module than can convert
>between RGB and CMYK jpeg images? If not, does anyone know
>of any good online resources to help me in this task?
The Image::Magick module would seem to be just the ticket.
Download it from CPAN or use PPM to install it if you use
Activestate Perl.
Read about it at
http://search.cpan.org/author/JCRISTY/PerlMagick-5.54/Magick.pm
There are examples of its use in
http://www.stonehenge.com/merlyn/WebTechniques/col53.html
--
Regards, Helgi Briem
helgi AT decode DOT is
------------------------------
Date: 17 Feb 2003 13:28:43 GMT
From: nobody <noemail@nowhere.net>
Subject: Re: one liner in command line
Message-Id: <Xns93255695097D3abccbaabc@129.250.170.82>
> how can use a variable in a one line program
> if it's in the command line?
perl -e "my $x=99; print $x;"
------------------------------
Date: Mon, 17 Feb 2003 15:10:37 +0100
From: Josef =?iso-8859-1?Q?M=F6llers?= <josef.moellers@fujitsu-siemens.com>
Subject: Re: one liner in command line
Message-Id: <3E50ED5D.CFEA1EF@fujitsu-siemens.com>
nobody wrote:
> =
> > how can use a variable in a one line program
> > if it's in the command line?
> =
> perl -e "my $x=3D99; print $x;"
Not really:
josef@bounty:~ > perl -e "my $x=3D99; print $x;"
syntax error at -e line 1, near "my =3D"
Execution of -e aborted due to compilation errors.
Better:
perl -e 'my $x=3D99; print $x;'
-- =
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
------------------------------
Date: Mon, 17 Feb 2003 14:30:37 GMT
From: ebchang <chang0@adelphia.net>
Subject: Re: one liner in command line
Message-Id: <Xns932561167FB08chang0adelphia.net@24.48.107.53>
Josef Möllers <josef.moellers@fujitsu-siemens.com> wrote in
news:3E50ED5D.CFEA1EF@fujitsu-siemens.com:
> nobody wrote:
>>
>
>> > how can use a variable in a one line program
>> > if it's in the command line?
>>
>
>> perl -e "my $x=99; print $x;"
>
> Not really:
>
> josef@bounty:~ > perl -e "my $x=99; print $x;"
> syntax error at -e line 1, near "my ="
> Execution of -e aborted due to compilation errors.
>
> Better:
> perl -e 'my $x=99; print $x;'
>
Not necessarily:
C:\>perl -e 'my $x=99;print $x;'
Can't find string terminator "'" anywhere before EOF at -e line 1.
C:\>perl -e "my $x=99;print $x;"
99
--
EBC
------------------------------
Date: Mon, 17 Feb 2003 14:38:27 GMT
From: Graham Drabble <graham.drabble@lineone.net>
Subject: Re: one liner in command line
Message-Id: <Xns932594EFD28A6grahamdrabblelineone@ID-77355.user.dfncis.de>
On 17 Feb 2003 Josef Möllers <josef.moellers@fujitsu-siemens.com>
wrote in news:3E50ED5D.CFEA1EF@fujitsu-siemens.com:
> nobody wrote:
>>
>
>> > how can use a variable in a one line program
>> > if it's in the command line?
>>
>
>> perl -e "my $x=99; print $x;"
>
> Not really:
>
> josef@bounty:~ > perl -e "my $x=99; print $x;"
> syntax error at -e line 1, near "my ="
> Execution of -e aborted due to compilation errors.
C:\>perl -e "my $x=99; print $x;"
99
C:\>
> Better:
> perl -e 'my $x=99; print $x;'
C:\>perl -e 'my $x=99; print $x;'
Can't find string terminator "'" anywhere before EOF at -e line 1.
I think this is a Windows/Unix thing.
--
Graham Drabble
If you're interested in what goes on in other groups or want to find
an interesting group to read then check news.groups.reviews for what
others have to say or contribute a review for others to read.
------------------------------
Date: Mon, 17 Feb 2003 15:27:05 +0200
From: "Teh (tî'pô)" <teh@mindless.com>
Subject: Re: Perl dies silently.
Message-Id: <igo15v8dfkscp4aiekthsofjcr2phoeoha@4ax.com>
I (eye) bravely attempted to attach 15 electrodes of knowledge
to the nipples of comp.lang.perl.misc by saying:
>Hi, I'm having a wield problem.
>I'm maintaining a bit Perl project and every now and then perl dies
>silently.
>
>This happens in some cases when there's a fatal error (call a method
>on an unblessed scalar) and sometimes when die or croak are called
>explicitly, if I run the process via the debugger I see the output
>otherwise it's just not there.
>
>STDERR hasn't been closed, if I print stuff explicitly to STDERR it
>makes it to the console.
>
>Does anyone have an idea where I should start looking for the problem?
Just wanted to let you know that I found the problem.
We have several wrappers that look like this:
#!/bin/env perl
do "actualscript.pl";
apparently do fails because of the die but as nobody tested do's
return value and it "ate" the output we got the behaviour mentioned
above.
What I'm going to do is change the dos to requires which should solve
the problem with minimal interference.
Thanks for the advice TvP.
------------------------------
Date: Mon, 17 Feb 2003 15:08:56 GMT
From: Mika Moilanen <mikmoila@shire.ntc.nokia.com>
Subject: Perl program for web topology?
Message-Id: <61oznovkkyy.fsf@spade.ntc.nokia.com>
Hello!
Can anyone point me a handy perl program for creating any kind of
graph (ascii format preferred) out of set of web pages (I'm talking
about local pages, I'm not analysing www :)).
--
Best Regards,
Mika
----------------------------------------------------------
mikmoila@shire.ntc.nokia.com phone: +358-0-511-23587
Nokia Networks, PO box 320, FIN-00045 NOKIA GROUP, Finland
----------------------------------------------------------
------------------------------
Date: Mon, 17 Feb 2003 15:58:32 +0100
From: Pavel Hlavnicka <pavel@gingerall.cz>
Subject: PL_defstash and segfault (for geeks only)
Message-Id: <b2qta4$925$1@ns.felk.cvut.cz>
Hi all,
I've met a segmentation fault using mod_perl 1.27, apache 1.3.27 and
perl 5.8. Some debugging pointed to the following piece of code (see the
whole backtrace at the end)
in Perl_gv_fetchpv (gv.c)
if (!stash)
stash = PL_defstash; /* <-- here is the problem
'stash' was NULL at this moment
Trying to trace PL_defstash definition I've got lost totally. :)
This problem occure first on vanilla RedHat 8 installation (all from
RPM's). Afterwards I compiled perl 5.8 as:
sh Configure -des -Dprefix='/home/pavel/perl-5.8' -Dusethreads
-Duseshrplib -Doptimize='-O0 -g' -Uinstallusrbinperl
and the result was the same.
Omitting -Dusethreads fixes the trouble and all works fine.
What could be wrong with PL_defstash?
Many thanks in advance.
Pavel
Backtrace:
#0 0x4003e32d in Perl_gv_fetchpv (my_perl=0x0,
nambeg=0x80c68a7 "Apache::Server::AutoPreLoad", add=0, sv_type=4)
at gv.c:646
#1 0x4003726b in Perl_get_sv (my_perl=0x0,
name=0x80c68a7 "Apache::Server::AutoPreLoad", create=0) at perl.c:1712
#2 0x08058c40 in mp_preload_module (name=0xbfff93d8) at perl_config.c:428
#3 0x08058efa in perl_cmd_handler_handlers (parms=0xbffff790,
rec=0x80f468c,
arg=0x80f4834 "Apache::Registry") at perl_config.c:554
#4 0x0809c649 in invoke_cmd (cmd=0x80db2a0, parms=0xbffff790,
mconfig=0x80f468c, args=0xbfff94bc "") at http_config.c:918
#5 0x0809ca4f in ap_handle_command (parms=0xbffff790, config=0x80f4364,
l=0xbfff94a0 "PerlHandler Apache::Registry") at http_config.c:1030
#6 0x0809cad6 in ap_srm_command_loop (parms=0xbffff790, config=0x80f4364)
at http_config.c:1044
#7 0x080a02bc in urlsection (cmd=0xbffff790, dummy=0x80f3a14,
arg=0xbfffb5df "") at http_core.c:1655
#8 0x0809c003 in invoke_cmd (cmd=0x80d3250, parms=0xbffff790,
mconfig=0x80f3a14, args=0xbfffb5da "/perl") at http_config.c:810
#9 0x0809ca4f in ap_handle_command (parms=0xbffff790, config=0x80f3894,
l=0xbfffb5d0 "<Location /perl") at http_config.c:1030
#10 0x0809cad6 in ap_srm_command_loop (parms=0xbffff790, config=0x80f3894)
at http_config.c:1044
#11 0x080a0ac7 in virtualhost_section (cmd=0xbffff790, dummy=0x80e6d7c,
arg=0xbfffd6fd "212.24.153.10") at http_core.c:1913
#12 0x0809c003 in invoke_cmd (cmd=0x80d3280, parms=0xbffff790,
mconfig=0x80e6d7c, args=0xbfffd6fd "212.24.153.10") at
http_config.c:810
#13 0x0809ca4f in ap_handle_command (parms=0xbffff790, config=0x80e61ec,
l=0xbfffd6f0 "<VirtualHost 212.24.153.10") at http_config.c:1030
#14 0x0809cad6 in ap_srm_command_loop (parms=0xbffff790, config=0x80e61ec)
at http_config.c:1044
#15 0x0809d265 in ap_process_resource_config (s=0x80e57a4,
fname=0x80e6e14 "/usr/local/apache/conf/httpd.conf", p=0x80e577c,
ptemp=0x80e979c) at http_config.c:1332
#16 0x0809db43 in ap_read_config (p=0x80e577c, ptemp=0x80e979c,
confname=0x80ddf20 "conf/httpd.conf") at http_config.c:1616
#17 0x080a8280 in main (argc=2, argv=0xbffff8d4) at http_main.c:5433
#18 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
------------------------------
Date: Mon, 17 Feb 2003 13:35:59 GMT
From: "Kevin Myers" <KevinMyers@austin.rr.com>
Subject: Reading Nested HTML Tables
Message-Id: <3z54a.32202$Lm5.1200745@twister.austin.rr.com>
Hi folks,
I'm new to this newgroup, and a relative amateur where perl is concerned.
So, if I'm posting to the wrong list or asking an ignorant question then I
hope that you'll bear with me...
I'm trying to use perl to walk some web pages and extract some data. I've
done this successfully in the past, and have the basics down.
However, I presently have a situation where I need to create a list of the
outermost level of tables on the web pages, where there may be nested levels
of tables, and I can't seem to come up with a simple way to handle this.
I'm wondering if I am missing some tricks...
To extract a list of tables from a web page in the past, I have merely used
perl's regular expression handling to create a list of text items that are
delimited by the <table> and </table> tags, e.g :
my (@tables) = $pageContent =~ m!(<table.*?>.*?</table>)!gs;
However, now I am running into
problems because the first </table> tag encountered after a <table> tag may
be the end of a nested inner level table, rather than the end of the
outermost level table that I want. I need some way to tell perl to only
search for a </table> tag at the outermost nesting level. Is there some
easy way to do this that I am missing?
Thanks greatly in advance for any help.
s/KAM
------------------------------
Date: Mon, 17 Feb 2003 13:34:24 +0000
From: Chris Lowth <dont@want.spam>
Subject: Re: Reading Nested HTML Tables
Message-Id: <fG54a.778$QF6.205272@newsfep2-win.server.ntli.net>
Kevin Myers wrote:
> Hi folks,
>
> I'm new to this newgroup, and a relative amateur where perl is concerned.
> So, if I'm posting to the wrong list or asking an ignorant question then I
> hope that you'll bear with me...
>
> I'm trying to use perl to walk some web pages and extract some data. I've
> done this successfully in the past, and have the basics down.
>
> However, I presently have a situation where I need to create a list of the
> outermost level of tables on the web pages, where there may be nested
> levels of tables, and I can't seem to come up with a simple way to handle
> this. I'm wondering if I am missing some tricks...
>
> To extract a list of tables from a web page in the past, I have merely
> used perl's regular expression handling to create a list of text items
> that are delimited by the <table> and </table> tags, e.g :
>
> my (@tables) = $pageContent =~ m!(<table.*?>.*?</table>)!gs;
>
> However, now I am running into
> problems because the first </table> tag encountered after a <table> tag
> may be the end of a nested inner level table, rather than the end of the
> outermost level table that I want. I need some way to tell perl to only
> search for a </table> tag at the outermost nesting level. Is there some
> easy way to do this that I am missing?
>
> Thanks greatly in advance for any help.
>
> s/KAM
The HTML::Parse (now deprecated) or HTML::TreeBuilder modules are probably
what you want - available on www.cpan.org
Chris
--
My real e-mail address is
chris <at> lowth <dot> com
------------------------------
Date: 17 Feb 2003 03:54:27 -0800
From: jsn@microlib.co.uk (Jason Singleton)
Subject: Returning the field list from DBI
Message-Id: <f34f7dc6.0302170354.9e96ac4@posting.google.com>
Well I think the subject says it all here :) but basically I just need
to know the fields returned from a query when I don't name them eg
using *
Also how do I change the read position in the returned data? I don't
want to return all records to the user at once I want it to display
the returned data in pages like a search engine.
------------------------------
Date: 17 Feb 2003 12:30:01 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Returning the field list from DBI
Message-Id: <u97kbzrsxi.fsf@wcl-l.bham.ac.uk>
jsn@microlib.co.uk (Jason Singleton) writes:
> Well I think the subject says it all here :) but basically I just need
> to know the fields returned from a query when I don't name them eg
> using *
Look for the phrase "field names" in the documentation of DBI. I
think the about third occurance is the answer to your question.
> Also how do I change the read position in the returned data? I don't
> want to return all records to the user at once I want it to display
> the returned data in pages like a search engine.
I don't think you can do this in DBI. You just have to discard some
rows then read some rows.
Some dialects of SQL have LIMIT and OFFSET qalifiers on SELECT or some
similar extension.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 17 Feb 2003 07:26:54 -0800
From: genericax@hotmail.com (Sara)
Subject: Re: Returning the field list from DBI
Message-Id: <776e0325.0302170726.29c767ce@posting.google.com>
jsn@microlib.co.uk (Jason Singleton) wrote in message news:<f34f7dc6.0302170354.9e96ac4@posting.google.com>...
> Well I think the subject says it all here :) but basically I just need
> to know the fields returned from a query when I don't name them eg
> using *
>
> Also how do I change the read position in the returned data? I don't
> want to return all records to the user at once I want it to display
> the returned data in pages like a search engine.
Perhaps..
my $fields = $handle->fetchrow_hashref();
my $fieldNames = keys %$fields;
Note that the "as" clause in the sql statement can be useful for
"steering" your field-names to perhaps more friendly ones. Also note
the the names will always come back uppercase.
select count(*) as n from people where zip = 12345;
By "read position" I'm not sure what you mean. If you mean that one
user has multiple records, then continue to fetch until you get them
all. If you mean you want to get fewer than ALL fields in the fetch,
then change your select to break up the row into smaller pieces.
Good luck!
-Gx
------------------------------
Date: Mon, 17 Feb 2003 06:54:30 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Sharing Variables and Functions Across Modules
Message-Id: <slrnb51ms6.jfp.tadmc@magna.augustmail.com>
Hal Vaughan <hal@thresholddigital.com> wrote:
> Tad McClellan wrote:
>> Please consider doing the below in the future, it will help us help you:
>>
>> First make a short (less than 20-30 lines) and *complete* program
>> that illustrates the problem you are having. People should be able
>> to run your program by copy/pasting the code from your article. (You
>> will find that doing this step very often reveals your problem
>> directly. Leading to an answer much more quickly and reliably than
>> posting to Usenet.)
>>
>> It isn't hard to do. I've done it for you below.
>
> I wish I could, but this project is under a specific contract.
That has nothing to do with what I asked.
You don't have to post your real program, it is probably too
big for folks to look at anyway.
You could have posted Real Code that illustrated the problem though.
_I_ posted real code that illustrated the problem, it was only
about 30 lines. You could have done the same thing without
giving away any trade secrets.
You would have gotten a much better solution if you had done that.
My solution sucks, I would never do that in my code. It *maximizes*
name space pollution.
If you had shown complete code that included the Right Way to do
it (ie. with package declarations), then you could have gotten a
good solution that doesn't pollute the main namespace.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 17 Feb 2003 06:49:03 -0800
From: bh_ent@hotmail.com (Drew Myers)
Subject: Re: split and join
Message-Id: <d1b6a249.0302170649.4ee67c4@posting.google.com>
Wow, thank you both for your responses!
Almost sounds like I'm starting to get a handle on this perl business. Frightening.
------------------------------
Date: Mon, 17 Feb 2003 12:53:10 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <v51mpmlu518j5a@corp.supernews.com>
Following is a summary of articles spanning a 7 day period,
beginning at 10 Feb 2003 12:54:06 GMT and ending at
17 Feb 2003 12:30:01 GMT.
Notes
=====
- A line in the body of a post is considered to be original if it
does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
- All text after the last cut line (/^-- $/) in the body is
considered to be the author's signature.
- The scanner prefers the Reply-To: header over the From: header
in determining the "real" email address and name.
- Original Content Rating (OCR) is the ratio of the original content
volume to the total body volume.
- Find the News-Scan distribution on the CPAN!
<URL:http://www.perl.com/CPAN/modules/by-module/News/>
- Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
- Copyright (c) 2003 Greg Bacon.
Verbatim copying and redistribution is permitted without royalty;
alteration is not permitted. Redistribution and/or use for any
commercial purpose is prohibited.
Excluded Posters
================
perlfaq-suggestions\@(?:.*\.)?perl\.com
faq\@(?:.*\.)?denver\.pm\.org
comdog\@panix\.com
Totals
======
Posters: 254
Articles: 792 (353 with cutlined signatures)
Threads: 182
Volume generated: 1505.9 kb
- headers: 679.4 kb (13,051 lines)
- bodies: 783.0 kb (25,156 lines)
- original: 488.8 kb (16,851 lines)
- signatures: 42.7 kb (1,095 lines)
Original Content Rating: 0.624
Averages
========
Posts per poster: 3.1
median: 1.0 post
mode: 1 post - 133 posters
s: 6.0 posts
Posts per thread: 4.4
median: 3.0 posts
mode: 2 posts - 34 threads
s: 5.1 posts
Message size: 1947.0 bytes
- header: 878.4 bytes (16.5 lines)
- body: 1012.4 bytes (31.8 lines)
- original: 631.9 bytes (21.3 lines)
- signature: 55.2 bytes (1.4 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
60 118.7 ( 50.6/ 58.7/ 30.2) Benjamin Goldberg <goldbb2@earthlink.net>
37 100.6 ( 40.8/ 55.0/ 46.1) tadmc@augustmail.com
33 60.0 ( 24.8/ 35.2/ 13.9) Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
26 68.5 ( 25.0/ 37.7/ 18.4) tassilo.parseval@post.rwth-aachen.de
21 47.0 ( 20.0/ 23.2/ 21.0) abigail@abigail.nl
18 30.9 ( 16.2/ 13.2/ 7.0) Brian McCauley <nobull@mail.com>
17 29.4 ( 11.5/ 17.9/ 10.4) Jay Tilton <tiltonj@erols.com>
13 30.9 ( 11.1/ 19.5/ 8.7) Randy Kobes <randy@theoryx5.uwinnipeg.ca>
13 18.9 ( 11.1/ 7.8/ 4.6) "Jürgen Exner" <jurgenex@hotmail.com>
12 18.1 ( 8.7/ 8.8/ 4.8) helgi@decode.is
These posters accounted for 31.6% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
118.7 ( 50.6/ 58.7/ 30.2) 60 Benjamin Goldberg <goldbb2@earthlink.net>
100.6 ( 40.8/ 55.0/ 46.1) 37 tadmc@augustmail.com
68.5 ( 25.0/ 37.7/ 18.4) 26 tassilo.parseval@post.rwth-aachen.de
60.0 ( 24.8/ 35.2/ 13.9) 33 Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
47.0 ( 20.0/ 23.2/ 21.0) 21 abigail@abigail.nl
30.9 ( 11.1/ 19.5/ 8.7) 13 Randy Kobes <randy@theoryx5.uwinnipeg.ca>
30.9 ( 16.2/ 13.2/ 7.0) 18 Brian McCauley <nobull@mail.com>
29.4 ( 11.5/ 17.9/ 10.4) 17 Jay Tilton <tiltonj@erols.com>
24.3 ( 11.3/ 12.9/ 4.8) 10 "Jodyman" <Jodyman@hotmail.com>
21.5 ( 11.1/ 10.2/ 7.6) 11 "Alan J. Flavell" <flavell@mail.cern.ch>
These posters accounted for 35.3% of the total volume.
Top 10 Posters by Volume of Original Content (min. five posts)
==============================================================
(kb)
Posts orig Address
----- ----- -------
37 46.1 tadmc@augustmail.com
60 30.2 Benjamin Goldberg <goldbb2@earthlink.net>
21 21.0 abigail@abigail.nl
26 18.4 tassilo.parseval@post.rwth-aachen.de
33 13.9 Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
17 10.4 Jay Tilton <tiltonj@erols.com>
6 8.8 Jim Seymour <gort@LinxNet.com>
13 8.7 Randy Kobes <randy@theoryx5.uwinnipeg.ca>
11 7.6 "Alan J. Flavell" <flavell@mail.cern.ch>
18 7.0 Brian McCauley <nobull@mail.com>
These posters accounted for 35.2% of the original volume.
Top 10 Posters by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.908 ( 21.0 / 23.2) 21 abigail@abigail.nl
0.838 ( 46.1 / 55.0) 37 tadmc@augustmail.com
0.802 ( 4.1 / 5.2) 8 Joel Konkle-Parker <j.j.konkle-parker@larc.nasa.gov>
0.764 ( 4.4 / 5.8) 6 Eric Schwartz <eric.schwartz@hp.com>
0.744 ( 2.8 / 3.7) 5 Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
0.742 ( 7.6 / 10.2) 11 "Alan J. Flavell" <flavell@mail.cern.ch>
0.727 ( 8.8 / 12.1) 6 Jim Seymour <gort@LinxNet.com>
0.711 ( 5.1 / 7.1) 11 "Tore Aursand" <tore@aursand.no>
0.702 ( 3.3 / 4.7) 5 "Ben Kennedy" <bkennedy@hmsonline.com>
0.670 ( 2.6 / 3.8) 6 bwalton@rochester.rr.com
Bottom 10 Posters by OCR (minimum of five posts)
================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.471 ( 4.8 / 10.1) 11 "Janek Schleicher" <bigj@kamelfreund.de>
0.470 ( 3.4 / 7.2) 7 "eric" <eric.ehlers@btopenworld.com.nospam>
0.453 ( 3.7 / 8.1) 7 "James E Keenan" <jkeen@concentric.net>
0.448 ( 8.7 / 19.5) 13 Randy Kobes <randy@theoryx5.uwinnipeg.ca>
0.394 ( 13.9 / 35.2) 33 Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
0.369 ( 4.8 / 12.9) 10 "Jodyman" <Jodyman@hotmail.com>
0.361 ( 1.3 / 3.6) 5 mthunter@uiuc.edu
0.294 ( 1.5 / 5.1) 5 "Tintin" <me@privacy.net>
0.285 ( 2.4 / 8.3) 9 "John W. Krahn" <krahnj@acm.org>
0.199 ( 1.0 / 4.8) 8 "Bernard El-Hagin" <bernard.el-hagin@DODGE_THISlido-tech.net>
34 posters (13%) had at least five posts.
Top 10 Threads by Number of Posts
=================================
Posts Subject
----- -------
26 strict and warnings
22 use lib Apache->server_root_relative('lib/perl');
21 newbie date comparison
18 building hash
16 Why won't my for loop work?
16 Please explain this weird error message
14 Insecure Filehandle Dependencies
14 grep with line number ?
12 Request help with this script
11 Perl+Tk+MySQL for Win32 that *works*?
These threads accounted for 21.5% of all articles.
Top 10 Threads by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Subject
-------------------------- ----- -------
67.2 ( 26.9/ 36.6/ 22.9) 26 strict and warnings
47.3 ( 22.5/ 23.8/ 9.9) 21 newbie date comparison
43.6 ( 21.9/ 20.4/ 10.8) 22 use lib Apache->server_root_relative('lib/perl');
38.5 ( 15.5/ 21.8/ 12.1) 18 building hash
34.2 ( 9.5/ 23.5/ 13.2) 11 Perl+Tk+MySQL for Win32 that *works*?
33.9 ( 1.9/ 32.0/ 32.0) 2 Posting Guidelines for comp.lang.perl.misc ($Revision: 1.3 $)
31.7 ( 12.1/ 18.0/ 12.2) 16 Why won't my for loop work?
28.2 ( 13.2/ 14.0/ 8.4) 14 Insecure Filehandle Dependencies
25.8 ( 11.1/ 14.3/ 8.1) 12 Request help with this script
25.6 ( 6.1/ 19.5/ 12.5) 7 error in comparing user supplied data to database
These threads accounted for 25.0% of the total volume.
Top 10 Threads by OCR (minimum of five posts)
=============================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.845 ( 2.4/ 2.8) 5 Newbie - removing temporary files
0.803 ( 6.7/ 8.3) 5 binary data and utf8 (I think)
0.719 ( 2.6/ 3.6) 5 Socket command
0.711 ( 2.2/ 3.0) 5 $^S == 0 inside eval (v5.6.1)
0.701 ( 2.2/ 3.1) 5 Minimalist Perl Interpreter for Windows 98 and XP?
0.689 ( 4.9/ 7.1) 5 Saving/Editing SQL queries
0.686 ( 1.9/ 2.7) 6 String Compare Help
0.681 ( 4.3/ 6.2) 7 [Regex] Removing lines not containing a substring
0.679 ( 12.2/ 18.0) 16 Why won't my for loop work?
0.673 ( 5.3/ 7.8) 16 Please explain this weird error message
Bottom 10 Threads by OCR (minimum of five posts)
================================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.471 ( 0.9 / 1.8) 5 How to Iterate through a String
0.463 ( 1.1 / 2.4) 6 Simple Regular Expressions Question
0.418 ( 9.9 / 23.8) 21 newbie date comparison
0.417 ( 1.7 / 4.2) 5 use integer, strange negative results
0.410 ( 4.7 / 11.6) 14 grep with line number ?
0.397 ( 1.5 / 3.8) 7 stripping part of a string
0.390 ( 2.3 / 5.9) 5 I'm just not getting it... FAQ5
0.370 ( 2.9 / 7.8) 8 Scope of a global lexical
0.347 ( 1.5 / 4.3) 5 Paging output
0.315 ( 1.5 / 4.8) 8 Variation on iterating through a string
66 threads (36%) had at least five posts.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
10 comp.lang.perl.modules
6 alt.perl
5 comp.os.linux.setup
5 comp.os.linux.misc
4 comp.databases.ibm-db2
1 comp.lang.php
1 bit.listserv.cics-l
1 comp.lang.java.programmer
1 news.answers
1 comp.answers
Top 10 Crossposters
===================
Articles Address
-------- -------
3 Benjamin Goldberg <goldbb2@earthlink.net>
2 "Paanwa" <paanwa@hotmail.com>
2 "Kjetil" <kjetil.klove@nrk.no>
2 Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
2 Daniel Cutter <dcutter@gmx.de>
2 Wonderinguy <wonderinguy@hotmail.com>
2 Eric Moors <scare.crow@oz.land>
2 Darin McBride <dmcbride@naboo.to.org.no.spam.for.me>
2 jari.aalto@poboxes.com
2 "Aakash Bordia" <a_bordia@hotmail.com>
------------------------------
Date: Mon, 17 Feb 2003 12:57:18 GMT
From: "Papa Oohmawmaw" <Pop@goesthe.net>
Subject: Re: use lib Apache->server_root_relative('lib/perl');
Message-Id: <7_44a.139174$tq4.4383@sccrnsc01>
Why do all you guys reply at the bottom of every email? You have to scroll
down to the bottom of every post you read even though you know everything
that's been said. Tradition, I guess. Maybe you can't remember and need to
read everything again.
Also, what does PLOINK mean? Is it a signature or something? Let's see. PL
has to do with PERL because a lot of the extensions in my 5.8.0 folder are
PL. We all know what OINK means. So, I guess that's short for "PERL PIG",
correct? I've seen that signature a couple of times in this particular
thread. Group thing, I suppose. To each his own.
"Helgi Briem" <helgi@decode.is> wrote in message
news:3e50bec3.860529886@news.cis.dfn.de...
> On Sun, 16 Feb 2003 16:28:31 GMT, "Papa Oohmawmaw"
> <Pop@goesthe.net> wrote:
>
> >For those involved in this chat via email, I'm not interested in learning
> >Perl (at this point). I'm trying to set up a website on a dedicated
server
> >and want the benefits of Perl and Mod_perl. I got a dedicated server
> >specifically to set up "Apache::SpeedLimit.". I'm trying to learn enough
to
> >do this. That's all. When, and if, I come across something else in Perl,
> >I'll start looking again. My future does not begin and end with Perl.
>
> Well, get lost then.
>
> <PLOINK>
> --
> Regards, Helgi Briem
> helgi AT decode DOT is
------------------------------
Date: Mon, 17 Feb 2003 14:41:20 GMT
From: "David" <perl-dvd@darklaser.com>
Subject: Re: Variation on iterating through a string
Message-Id: <kw64a.16$F6.3475@news-west.eli.net>
"Matthew Lockner" <lockner@cse.psu.edu> wrote in message
news:b2a1o6$19n0$1@f04n12.cac.psu.edu...
> I'd like to request from the masters a slight variation on the
previous
> problem, of which I have occasionally found myself in need.
>
> A function, which takes a string as an argument, and returns a list of
the
> characters in that string (in order) - much like ML's explode
function.
> Preferably in a "most idiomatic Perl" version, and a "Perl golf"
version.
> The language being what it is, I find it hard to believe repeated
calls to
> substr are really the best way ("best" not necessarily being
"clearest").
I believe this is what you are looking for.
my $string="abcdefghijklmnopqrstuvwxyz";
my @letters = split(//, $string); # note there is nothing between the //
Regards,
David
------------------------------
Date: Mon, 17 Feb 2003 07:16:07 -0800
From: SAPBasis2003 <sapbasis2003@netscape.net>
Subject: Re: Win32::NetResource::GetSharedResources
Message-Id: <3E50FCB7.4030501@netscape.net>
Great! That helped a lot.
Gunnar Hjalmarsson wrote:
> SAPBasis2003 wrote:
>
>> {
>> map
>> {
>> $c_comp++;
>> print "$_\n";
>> }
>> @Resources;
>> }
>>
>> The output I get is:
>> HASH(0x1a5742c)
>> HASH(0x1abd35c)
>> HASH(0x1abd374)
>> HASH(0x1abd38c)
>> HASH(0x1abd3a4)
>
>
> Try to exchange
>
> print "$_\n";
>
> for
>
> for my $key (keys %$_) { print "$key = $$_{$key}\n" }
> print "\n";
>
> (untested)
>
> If that doesn't work, you may want to study e.g.
> http://www.perldoc.com/perl5.6/pod/perlreftut.html
>
> / Gunnar
>
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 4576
***************************************