[29076] in Perl-Users-Digest
Perl-Users Digest, Issue: 320 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 10 14:10:17 2007
Date: Tue, 10 Apr 2007 11:09:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 10 Apr 2007 Volume: 11 Number: 320
Today's topics:
Re: Absolute Path errors <hackeras@gmail.com>
Re: Absolute Path errors <bik.mido@tiscalinet.it>
Re: Absolute Path errors <hackeras@gmail.com>
Re: Absolute Path errors <hackeras@gmail.com>
Re: Absolute Path errors <bik.mido@tiscalinet.it>
Re: Absolute Path errors <bik.mido@tiscalinet.it>
Re: How to decoding a file handle? <bik.mido@tiscalinet.it>
Need help understanding an Array push <tester.paul@gmail.com>
Re: Need help understanding an Array push <glex_no-spam@qwest-spam-no.invalid>
Re: Need help understanding an Array push <someone@example.com>
Re: Need help understanding an Array push <someone@example.com>
Problems Binding Parameters for Stored Procedure <geoffrobinson@gmail.com>
Re: Why No Famous Open Source Projects From Britain/Ire <bik.mido@tiscalinet.it>
Re: Why No Famous Open Source Projects From Britain/Ire (Marc Espie)
Re: Why No Famous Open Source Projects From Britain/Ire <scobloke2@infotop.co.uk>
Re: Why No Famous Open Source Projects From Britain/Ire <abigail@abigail.be>
Re: Why No Famous Open Source Projects From Britain/Ire <sisyphus1@nomail.afraid.org>
Re: Why No Famous Open Source Projects From Britain/Ire <octomancer@blueyonder.co.uk>
Re: Why No Famous Open Source Projects From Britain/Ire (Randal L. Schwartz)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 10 Apr 2007 01:06:31 -0700
From: "=?iso-8859-7?B?zd/q7/I=?=" <hackeras@gmail.com>
Subject: Re: Absolute Path errors
Message-Id: <1176192391.541852.135490@p77g2000hsh.googlegroups.com>
=CF/=C7 usenet@DavidFilmer.com =DD=E3=F1=E1=F8=E5:
> On Apr 9, 2:59 pm, "=CD=DF=EA=EF=F2" <hacke...@gmail.com> wrote:
>
> > But why? The Webserver is supposed to identify both relative and
> > absolute paths.
>
> I'll say it again: the webserver is NOT servicing your file I/O.
> This is being serviced directly by the operating system.
>
> If you have a link to a document and the client clicks on the link,
> the webserver will service the request and go looking for the document
> (and THEN your document root matters).
>
> But the webserver is not involved when you do file I/O directly inside
> your Perl program. It does not matter that the webserver initiated the
> Perl program. Perl knows nothing about your webserver (and Perl has
> no idea your webserver invoked the program), and your webserver is not
> involved in anything that happens inside your Perl program (your Perl
> program is a 'black box' as far as your webserver is concerned).
So basically youa re saying that linking fro one cgi to another is
handled by the web server but opening/writing is handled by the OS.
ok.
But is nt it strange but the same commands used to work without full
hdd paths in the past, until yesterday which i deleted the index.html
that was pointing to index.pl?
How come then the webserver was able to handle those I/O requests and
executed the properly?
i had it like this: cleint request =3D> index.html (d:\www) =3D> index.pl
(d:\www\cgi-bin) and it was working ok.
Things changes when i deleted the redirection filer and set
DirectoryIndex index.html cgi-bin/index.pl
------------------------------
Date: Tue, 10 Apr 2007 11:23:21 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Absolute Path errors
Message-Id: <iflm13th7407n0u6r4mrpqeu8aa2ln296b@4ax.com>
On 9 Apr 2007 14:59:38 -0700, "?????" <hackeras@gmail.com> wrote:
>> This is I/O which is serviced directly by the operating system, not
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> the webserver. You must specify the full path as known by the OS
>> (including the path to your document root, if that's where the stuff
>> is), not a full or relative path as known only to your webserver.
>
>But why? The Webserver is supposed to identify both relative and
>absolute paths.
Because "this is I/O which is serviced directly by the operating
system".
Webserver ne OS. If you feel like that and have the expertise to, then
go write a kernel extention that will allow you to have a closer
interaction between them. But I don't think there's much a need for
such a thing around...
>/ stands for DocumentRoot, why cant it fid the files based on that ( /
>=3D "d:\www )
"/ stands for DocumentRoot" for the webserver. Thus IT (i.e. the
webserver) CAN "find the files based on that". The OS can't, because
it's NOT the webserver.
>I dotn see why.
Because "this is I/O which is serviced directly by the operating
system".
>nd also hw come it wont open files or load arrasy with files but be
>able to perform the following line ?
>the following line is also an absolute path based on document root and
>it does work!
>
>Tr( td( {class=3D>'lime'}, a( {href=3D>'/cgi-bin/show.pl?
>name=3Dshowlog'}, h1( {class=3D>'lime'}, $host )))),
This "line does work" because the only I/O handled by the OS amounts
to printing some strings. These strings will eventually reach one's
browser (a client) and the latter will issue a suitable GET to the
webserver, and IT (i.e. the webserver, now) CAN "find the files based
on that".
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: 10 Apr 2007 03:36:00 -0700
From: "=?iso-8859-7?B?zd/q7/I=?=" <hackeras@gmail.com>
Subject: Re: Absolute Path errors
Message-Id: <1176201360.886701.110280@p77g2000hsh.googlegroups.com>
=CF/=C7 Michele Dondi =DD=E3=F1=E1=F8=E5:
> On 9 Apr 2007 14:59:38 -0700, "?????" <hackeras@gmail.com> wrote:
>
> >> This is I/O which is serviced directly by the operating system, not
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> >> the webserver. You must specify the full path as known by the OS
> >> (including the path to your document root, if that's where the stuff
> >> is), not a full or relative path as known only to your webserver.
> >
> >But why? The Webserver is supposed to identify both relative and
> >absolute paths.
>
> Because "this is I/O which is serviced directly by the operating
> system".
>
> Webserver ne OS. If you feel like that and have the expertise to, then
> go write a kernel extention that will allow you to have a closer
> interaction between them. But I don't think there's much a need for
> such a thing around...
>
> >/ stands for DocumentRoot, why cant it fid the files based on that ( /
> >=3D3D "d:\www )
>
> "/ stands for DocumentRoot" for the webserver. Thus IT (i.e. the
> webserver) CAN "find the files based on that". The OS can't, because
> it's NOT the webserver.
>
> >I dotn see why.
>
> Because "this is I/O which is serviced directly by the operating
> system".
>
> >nd also hw come it wont open files or load arrasy with files but be
> >able to perform the following line ?
> >the following line is also an absolute path based on document root and
> >it does work!
> >
> >Tr( td( {class=3D3D>'lime'}, a( {href=3D3D>'/cgi-bin/show.pl?
> >name=3D3Dshowlog'}, h1( {class=3D3D>'lime'}, $host )))),
>
> This "line does work" because the only I/O handled by the OS amounts
> to printing some strings. These strings will eventually reach one's
> browser (a client) and the latter will issue a suitable GET to the
> webserver, and IT (i.e. the webserver, now) CAN "find the files based
> on that".
i see. so the webserver can only redirect to files and link to them,
in general only find them based on DocumentRoor but not open them or
wite to them in the same manner. only the os can do that cause I/O is
specifically designed to be performed by the OS. Aapche only find
files, not open them right?
------------------------------
Date: 10 Apr 2007 03:55:10 -0700
From: "=?iso-8859-7?B?zd/q7/I=?=" <hackeras@gmail.com>
Subject: Re: Absolute Path errors
Message-Id: <1176202510.136934.148480@p77g2000hsh.googlegroups.com>
=CF/=C7 Michele Dondi =DD=E3=F1=E1=F8=E5:
> On 9 Apr 2007 14:59:38 -0700, "?????" <hackeras@gmail.com> wrote:
>
> >> This is I/O which is serviced directly by the operating system, not
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> >> the webserver. You must specify the full path as known by the OS
> >> (including the path to your document root, if that's where the stuff
> >> is), not a full or relative path as known only to your webserver.
> >
> >But why? The Webserver is supposed to identify both relative and
> >absolute paths.
>
> Because "this is I/O which is serviced directly by the operating
> system".
>
> Webserver ne OS. If you feel like that and have the expertise to, then
> go write a kernel extention that will allow you to have a closer
> interaction between them. But I don't think there's much a need for
> such a thing around...
>
> >/ stands for DocumentRoot, why cant it fid the files based on that ( /
> >=3D3D "d:\www )
>
> "/ stands for DocumentRoot" for the webserver. Thus IT (i.e. the
> webserver) CAN "find the files based on that". The OS can't, because
> it's NOT the webserver.
>
> >I dotn see why.
>
> Because "this is I/O which is serviced directly by the operating
> system".
>
> >nd also hw come it wont open files or load arrasy with files but be
> >able to perform the following line ?
> >the following line is also an absolute path based on document root and
> >it does work!
> >
> >Tr( td( {class=3D3D>'lime'}, a( {href=3D3D>'/cgi-bin/show.pl?
> >name=3D3Dshowlog'}, h1( {class=3D3D>'lime'}, $host )))),
>
> This "line does work" because the only I/O handled by the OS amounts
> to printing some strings. These strings will eventually reach one's
> browser (a client) and the latter will issue a suitable GET to the
> webserver, and IT (i.e. the webserver, now) CAN "find the files based
> on that".
Yes but when i used to sue the index.html pointing to index.pl all
paths i ahd were relative and all I/O functions like fillign an @array
with files or opening files used to work with, could be opened and
edited without me having to descrivr the full hdd locations.
How was that possible back then?
------------------------------
Date: Tue, 10 Apr 2007 16:38:36 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Absolute Path errors
Message-Id: <998n13d4lgj5kum4rc8ojtu9bl98uriva5@4ax.com>
On 10 Apr 2007 03:36:00 -0700, "?????" <hackeras@gmail.com> wrote:
>i see. so the webserver can only redirect to files and link to them,
>in general only find them based on DocumentRoor but not open them or
>wite to them in the same manner. only the os can do that cause I/O is
>specifically designed to be performed by the OS. Aapche only find
>files, not open them right?
Well, I'm by far not an expert in these matters but I can hardly see
how the webserver could actually serve files without... err... well...
opening them.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Tue, 10 Apr 2007 16:39:55 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Absolute Path errors
Message-Id: <hb8n13d3ovuircbj502jeugenhvrnlrh6t@4ax.com>
On 10 Apr 2007 03:55:10 -0700, "?????" <hackeras@gmail.com> wrote:
>Yes but when i used to sue the index.html pointing to index.pl all
>paths i ahd were relative and all I/O functions like fillign an @array
>with files or opening files used to work with, could be opened and
>edited without me having to descrivr the full hdd locations.
>
>How was that possible back then?
Apparently there was a 1 to 1 mapping between local paths and urls
that gave you the impression you could *generally* use them in a
completely intechangeable manner, which is not the case.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Tue, 10 Apr 2007 10:56:11 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: How to decoding a file handle?
Message-Id: <j3km13phdfpv04efbl03t9houkp183d4jr@4ax.com>
On 9 Apr 2007 22:02:41 -0700, "happierbee" <wenbinye@gmail.com> wrote:
>I am planning to write a hexlize program that can handle multiple
What is a hexlize program?
(http://www.google.com/search?q=hexlize => 0 hits)
>encodings. A problem is that I want use function `read' to read seveal
>characters after decoding. If input is a file, function `open' can use
>encoding in module Encode to decode the input file. But is input is a
>file handle, STDIN, how to decode it if I don't want to decode it line
>by line? More important, utf-16 can't decode line by line.
If I understand your question correctly, of which I'm by no means
sure, you can re-open handles, for one thing. And then you also have
the C<open> pragma.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: 10 Apr 2007 08:33:36 -0700
From: "Paul" <tester.paul@gmail.com>
Subject: Need help understanding an Array push
Message-Id: <1176219216.022793.190440@p77g2000hsh.googlegroups.com>
Hello there. I'm new to Perl and am trying to maintain a large
complex script that generates some reports based on some text input
files. I'm having difficulty understanding a section of the code that
reads in from a text file with 3 columns of data to generate a new
output file with 5 columns of data. I was hoping that someone might
be able to help me understand a few lines that I find a bit complex
right now. Here are the details..
Sample Text input file:
---
"Filename" "Field" "Content"
"file0001.txt" "DESCRIPTION" "blah blah blah"
"file0001.txt" "NAME" "FOO"
"file0002.txt" "NAME" "BAR"
---
Need help understanding what this section of Perl code does:
1: foreach(@list) {
2: ($filenm,$fld_type,$content) = (split /\"/)[1,3,5];
3: $name =~ s/^\s+//;
4: $name =~ s/\s+$//;
5: push(@{$listcontent{"$filenm\{\{\{$fld_type"}},$content) if
($fld_type);
6: }
[snip]
7: foreach(sort keys %listcontent) {
8: ($newfilename, $fld_type) = split /\{\{\{/;
[...]
To start, @list is an array that holds the contents of the input file
(sans the header) like so:
["\"file0001.txt\"\t\"DESCRIPTION\"\t\"blah blah blah\"\n",
"\"file0001.txt\"\t\"NAME\"\t\"FOO\"\n",
"\"file0002.txt\"\t\"NAME\"\t\"BAR\"\n"]
What I know so far...
- line 1 - 6 iterates through each row in the @list array. ok.
- line 2 pulls out the content from each row into 3 variables. ok.
- lines 3 and 4 strip off the leading and trailing white space. ok.
- line 5. No idea. =(
--> Guess: it looks like "listcontent" is an array that now holds some
new arrangement of the data pulled out of the other array. I don't
get what the open curly braces are doing. I tried to "print" this
array after it ran but I didn't understand what I was seeing. It
looked like some kind of convoluted programming mess so I thought I
must have done something wrong.
-> Can anyone please tell me what this new array looks like, or help
me understand this line of code?
- line 7 starts a new loop iterating through the new array...
-> What does "sort keys" do? Well, okay, I know what 'sort' is, but I
don't get the 'keys' part. It's not a subroutine in this script, so
what's it sorting on/by here?
- line 8 pulls out the content from each row in "listcontent" into 2
new variables. I recognize the "\{\{\{" from line 5, but I don't get
how this is getting separated here. i.e. I don't know what
$newfilename looks like.
- I suppose if I understand line 5 I'll have a better chance of
understanding line 8.
Can anyone please help? Thanks in advance.
Paul.
------------------------------
Date: Tue, 10 Apr 2007 11:14:40 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: Need help understanding an Array push
Message-Id: <461bb7f1$0$10311$815e3792@news.qwest.net>
Paul wrote:
> Hello there. I'm new to Perl and am trying to maintain a large
> complex script that generates some reports based on some text input
> files. I'm having difficulty understanding a section of the code that
> reads in from a text file with 3 columns of data to generate a new
> output file with 5 columns of data. I was hoping that someone might
> be able to help me understand a few lines that I find a bit complex
> right now. Here are the details..
>
> Sample Text input file:
> ---
> "Filename" "Field" "Content"
> "file0001.txt" "DESCRIPTION" "blah blah blah"
> "file0001.txt" "NAME" "FOO"
> "file0002.txt" "NAME" "BAR"
> ---
>
> Need help understanding what this section of Perl code does:
>
> 1: foreach(@list) {
> 2: ($filenm,$fld_type,$content) = (split /\"/)[1,3,5];
No need to escape it.
> 3: $name =~ s/^\s+//;
> 4: $name =~ s/\s+$//;
> 5: push(@{$listcontent{"$filenm\{\{\{$fld_type"}},$content) if
> ($fld_type);
> 6: }
> [snip]
> 7: foreach(sort keys %listcontent) {
> 8: ($newfilename, $fld_type) = split /\{\{\{/;
> [...]
>
>
> To start, @list is an array that holds the contents of the input file
> (sans the header) like so:
> ["\"file0001.txt\"\t\"DESCRIPTION\"\t\"blah blah blah\"\n",
> "\"file0001.txt\"\t\"NAME\"\t\"FOO\"\n",
> "\"file0002.txt\"\t\"NAME\"\t\"BAR\"\n"]
>
> What I know so far...
>
> - line 1 - 6 iterates through each row in the @list array. ok.
> - line 2 pulls out the content from each row into 3 variables. ok.
> - lines 3 and 4 strip off the leading and trailing white space. ok.
>
> - line 5. No idea. =(
> --> Guess: it looks like "listcontent" is an array that now holds some
It's a Hash of Lists (HoL).
perldoc perldsc
> new arrangement of the data pulled out of the other array. I don't
> get what the open curly braces are doing.
No idea. It's the key to the hash, but why someone chose that format
is only known to you and the person who wrote it, based on this
small piece of code, it's not needed.
push(@{$listcontent{"$filenm:fld_type"}},$content) if $fld_type;
then later..
my ($newfilename, $fld_type) = split /:/;
> -> Can anyone please tell me what this new array looks like, or help
> me understand this line of code?
Yes, Data::Dumper can.
use Data::Dumper;
print Dumper( \%listcontent );
>
> - line 7 starts a new loop iterating through the new array...
No.. it iterates over the keys of a hash. Note, you'll
only see unique keys, so the push is a waste, or you need
to also iterate over the elements in the array, which might
be what's happening in the rest of the code.
> -> What does "sort keys" do? Well, okay, I know what 'sort' is, but I
> don't get the 'keys' part. It's not a subroutine in this script, so
> what's it sorting on/by here?
perldoc -f keys
> - line 8 pulls out the content from each row in "listcontent" into 2
> new variables.
It splits the key found in the listcontect hash.
>I recognize the "\{\{\{" from line 5, but I don't get
> how this is getting separated here. i.e. I don't know what
> $newfilename looks like.
perldoc -f split
No idea why you'd have "\{\{\{" in there either. Poor choice of
separator, IMHO.
You could simply print it out..
print "$newfilename\n";
> - I suppose if I understand line 5 I'll have a better chance of
> understanding line 8.
use Data::Dumper;
my %data;
push( @{ $data{ 'key1' } }, 'value 1' );
push( @{ $data{ 'key1' } }, 'value 2' );
print Dumper \%data;
$VAR1 = {
'key1' => [
'value 1',
'value 2'
]
};
Read through perldoc perldsc, perldoc -f keys, perldoc -f split,
and use Data::Dumper to examine the structure, and you should be
able to answer all of your questions.
------------------------------
Date: Tue, 10 Apr 2007 16:30:32 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Need help understanding an Array push
Message-Id: <IYOSh.61468$__3.57789@edtnps90>
Paul wrote:
> Hello there. I'm new to Perl and am trying to maintain a large
> complex script that generates some reports based on some text input
> files.
Are warnings and strict enabled in this script?
> I'm having difficulty understanding a section of the code that
> reads in from a text file with 3 columns of data to generate a new
> output file with 5 columns of data. I was hoping that someone might
> be able to help me understand a few lines that I find a bit complex
> right now. Here are the details..
>
> Sample Text input file:
> ---
> "Filename" "Field" "Content"
> "file0001.txt" "DESCRIPTION" "blah blah blah"
> "file0001.txt" "NAME" "FOO"
> "file0002.txt" "NAME" "BAR"
> ---
>
> Need help understanding what this section of Perl code does:
>
> 1: foreach(@list) {
Why are you reading in the whole file into an array? Is it really required?
> 2: ($filenm,$fld_type,$content) = (split /\"/)[1,3,5];
Your variables should be lexically scoped inside the foreach loop:
my ( $filenm, $fld_type, $content ) = ...
You are assuming that the indices 1, 3 and 5 of the list returned from split
will always contain valid data. You could do that without using "magic" numbers:
my ( $filenm, $fld_type, $content ) = /"([^"]+)"/g;
> 3: $name =~ s/^\s+//;
> 4: $name =~ s/\s+$//;
You are modifying the $name variable. Where did this variable come from and
what does it contain and why are you modifying it here?
> 5: push(@{$listcontent{"$filenm\{\{\{$fld_type"}},$content) if
> ($fld_type);
perldoc perldata
perldoc perldsc
perldoc perllol
You are pushing $content onto the array @{ $listcontent{
"$filenm\{\{\{$fld_type" } }. The array is stored in the hash %listcontent
using the hash key "$filenm\{\{\{$fld_type". It is know in Perl as a HoA
(hash of arrays.)
> 6: }
> [snip]
> 7: foreach(sort keys %listcontent) {
> 8: ($newfilename, $fld_type) = split /\{\{\{/;
> [...]
John
--
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order. -- Larry Wall
------------------------------
Date: Tue, 10 Apr 2007 16:45:12 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Need help understanding an Array push
Message-Id: <saPSh.61469$__3.1236@edtnps90>
J. Gleixner wrote:
> Paul wrote:
>>
>> - line 5. No idea. =(
>> --> Guess: it looks like "listcontent" is an array that now holds some
>
> It's a Hash of Lists (HoL).
perldoc -q "What is the difference between a list and an array"
John
--
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order. -- Larry Wall
------------------------------
Date: 10 Apr 2007 10:42:54 -0700
From: "geoffrobinson" <geoffrobinson@gmail.com>
Subject: Problems Binding Parameters for Stored Procedure
Message-Id: <1176226974.351338.146760@y5g2000hsa.googlegroups.com>
I have a stored procedure I need to call and get a value back from an
input/output parameter. The stored procedure is on a SQL Server 2005
DB. The first parameter is a varchar parameter. The second is a inout
variable which is returning a decimal value.
Via, SQL Server tools I would call it like this:
exec spMyStoredProcedure 'some string', @varname OUTPUT
So after research and tinkering the best code I could come up with is:
my $var1;
my $statement = "exec spMyStoredProcedure '?', ? OUTPUT";
my $sth-> $dbh->prepare($statement);
$sth->bind_param(1, "some string");
$sth->bind_param_inout(2, \$var1, 50);
$sth->execute();
$sth->finish();
The above code is giving me an error that I "can't bind unknown
placeholder '2'. I tried removing the quotes from the first question
mark, and I got a different error. The statement could not be
prepared.
If anyone has any insight into what is wrong, I would greatly
appreciate any help you can give me.
thanks,
Geoff
------------------------------
Date: Tue, 10 Apr 2007 11:12:05 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Why No Famous Open Source Projects From Britain/Ireland?
Message-Id: <b6lm13hedsi1du6i3agqpvj292jrclgjrb@4ax.com>
On 9 Apr 2007 14:03:41 -0700, "Robert" <callingrw@yahoo.com> wrote:
>How come there are no famous and widely-used open source products that
>were founded and (more or less) developed from the United Kingdom or
>Ireland? I find that odd.
>
>Perl was founded, largely developed, and led by Larry Wall, who I
>think is American(mainly in California?).
[snip]
Of some relevance to your post: http://tinyurl.com/2snqv6
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Tue, 10 Apr 2007 10:00:40 +0000 (UTC)
From: espie@lain.home (Marc Espie)
Subject: Re: Why No Famous Open Source Projects From Britain/Ireland?
Message-Id: <evfn88$2qgb$1@biggoron.nerim.net>
In article <1176152621.806250.287130@n76g2000hsh.googlegroups.com>,
Robert <callingrw@yahoo.com> wrote:
>OCaml -> somewhere in France
Paris area, actually. OCaml is originally the work of Xavier Leroy and
Damien Doligez, which began while they were students at ENS, based on former
caml, which was neither efficient nor a success.
Both later moved to INRIA Rocquencourt, near Paris (located near Versailles)
to continue that project.
There has been some notable development in japan as well, by Jacques
Garrigues, a former student from the same school.
------------------------------
Date: Tue, 10 Apr 2007 11:08:28 +0100
From: Ian Wilson <scobloke2@infotop.co.uk>
Subject: Re: Why No Famous Open Source Projects From Britain/Ireland?
Message-Id: <461b6222$0$6957$fa0fcedb@news.zen.co.uk>
Robert wrote:
> Hey.
> How come there are no famous and widely-used open source products that
> were founded and (more or less) developed from the United Kingdom or
> Ireland? I find that odd.
An interesting point.
<Snip>
> Linux -> Linus Torvalds -> formerly Finland, now California
Linux is more than Linus Torvalds. Alan Cox is a significant contributer
and lives in the UK. I guess there may be many others less well known.
If you only look at founders you might get a distorted view of the
numbers of people contributing from various geographic areas.
Wasn't VNC developed in the UK?
------------------------------
Date: 10 Apr 2007 11:15:13 GMT
From: Abigail <abigail@abigail.be>
Subject: Re: Why No Famous Open Source Projects From Britain/Ireland?
Message-Id: <slrnf1mse2.vmf.abigail@alexandra.abigail.be>
Robert (callingrw@yahoo.com) wrote on MMMMCMLXIX September MCMXCIII in
<URL:news:1176152621.806250.287130@n76g2000hsh.googlegroups.com>:
-- Hey.
-- How come there are no famous and widely-used open source products that
-- were founded and (more or less) developed from the United Kingdom or
-- Ireland? I find that odd.
Well, there's that web thingy you hear a lot about lately that was
started by a fellow from Oxford.
Abigail
--
perl -wle 'eval {die [[qq [Just another Perl Hacker]]]};; print
${${${@}}[$#{@{${@}}}]}[$#{${@{${@}}}[$#{@{${@}}}]}]'
------------------------------
Date: Tue, 10 Apr 2007 21:39:06 +1000
From: "Sisyphus" <sisyphus1@nomail.afraid.org>
Subject: Re: Why No Famous Open Source Projects From Britain/Ireland?
Message-Id: <461b774f$0$22843$afc38c87@news.optusnet.com.au>
"Robert" <callingrw@yahoo.com> wrote in message
news:1176152621.806250.287130@n76g2000hsh.googlegroups.com...
> Hey.
> How come there are no famous and widely-used open source products that
> were founded and (more or less) developed from the United Kingdom or
> Ireland? I find that odd.
>
From Ireland we have the miracl library ( http://www.shamus.ie/ ) - a
rather good cryptographic library that has missed out on the attention that
it deserves - perhaps because it's not Unix-centric. (There's still no perl
interface to it.)
Is ImageMagick a product of the UK ? I thought it was ... but it's hard to
tell, now.
Cheers,
Rob
------------------------------
Date: 10 Apr 2007 07:08:11 -0700
From: "Octo" <octomancer@blueyonder.co.uk>
Subject: Re: Why No Famous Open Source Projects From Britain/Ireland?
Message-Id: <1176214091.341259.182770@n76g2000hsh.googlegroups.com>
Robert wrote:
> Hey.
> How come there are no famous and widely-used open source products that
> were founded and (more or less) developed from the United Kingdom or
> Ireland? I find that odd.
Exim, developed mainly by Phillip Hazel at Cambridge University, but
still open source.
------------------------------
Date: Tue, 10 Apr 2007 09:37:20 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Why No Famous Open Source Projects From Britain/Ireland?
Message-Id: <86wt0kjidb.fsf@blue.stonehenge.com>
>>>>> "Robert" == Robert <callingrw@yahoo.com> writes:
Robert> Linux -> Linus Torvalds -> formerly Finland, now California
s/California/Oregon/, as of two years ago.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
--
Posted via a free Usenet account from http://www.teranews.com
------------------------------
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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 V11 Issue 320
**************************************