[30653] in Perl-Users-Digest
Perl-Users Digest, Issue: 1898 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 3 16:09:46 2008
Date: Fri, 3 Oct 2008 13:09:13 -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 Fri, 3 Oct 2008 Volume: 11 Number: 1898
Today's topics:
Re: Can I use a function ref to call a function in a we <jurgenex@hotmail.com>
Re: Can I use a function ref to call a function in a we <cartercc@gmail.com>
Cheapest Generic Tramadol gerundialweissbe@gmail.com
Re: is Win32::GUI thread safe? <zentara@highstream.net>
Re: is Win32::GUI thread safe? <starbuck42+newsgroup@gmail.com>
Re: is Win32::GUI thread safe? <starbuck42+newsgroup@gmail.com>
Re: pack and hex <dontmewithme@got.it>
Re: pack and hex <ben@morrow.me.uk>
Re: pack and hex <dontmewithme@got.it>
Re: pack and hex <ben@morrow.me.uk>
Re: pack and hex <dontmewithme@got.it>
Re: Probably a stupid question but.... <rvtol+news@isolution.nl>
Re: Problems flushing my buffer! (perl) <dontmewithme@got.it>
Re: Problems flushing my buffer! (perl) xhoster@gmail.com
Re: Problems flushing my buffer! (perl) <jimsgibson@gmail.com>
simple CGI and ASP (isecc)
Tramadol Purchase Online 24/7 4 manleyfuinclude@gmail.com
trouble parsing "kind of" comma-delimited text <junk@yahoo.com>
Re: trouble parsing "kind of" comma-delimited text <tony_curtis32@yahoo.com>
Re: trouble parsing "kind of" comma-delimited text <jurgenex@hotmail.com>
Re: trouble parsing "kind of" comma-delimited text <ben@morrow.me.uk>
values <lipun4u@gmail.com>
Re: values <jurgenex@hotmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 03 Oct 2008 06:22:36 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Can I use a function ref to call a function in a web script?
Message-Id: <717ce418i9ae9c2bsi4gk23dfgd0s39681@4ax.com>
cartercc <cartercc@gmail.com> wrote:
>I've been playing with Lisp a lot for a few months, and am noticing a
>certain amount of commonality between Lisp and Perl. Writing functions
>that return data is (obviously) a common Lisp idiom, and I've been
>trying to do the same in Perl. I guess that this is something that one
>language supports but another language does not.
Maybe I am a bit dense, but what would a function return if not data?
Ok, it could return a function if it is a HOF, but that's rather
uncommon.
jue
------------------------------
Date: Fri, 3 Oct 2008 06:59:54 -0700 (PDT)
From: cartercc <cartercc@gmail.com>
Subject: Re: Can I use a function ref to call a function in a web script?
Message-Id: <a50d144e-6235-4b49-944e-63f3a1d029b0@l76g2000hse.googlegroups.com>
On Oct 3, 9:22=A0am, J=FCrgen Exner <jurge...@hotmail.com> wrote:
> cartercc <carte...@gmail.com> wrote:
> >I've been playing with Lisp a lot for a few months, and am noticing a
> >certain amount of commonality between Lisp and Perl. Writing functions
> >that return data is (obviously) a common Lisp idiom, and I've been
> >trying to do the same in Perl. I guess that this is something that one
> >language supports but another language does not.
>
> Maybe I am a bit dense, but what would a function return if not data?
Code. Lisp syntax is very regular. For example
(foo (bar baz) (foo (foo baz bar) baz bar) foo foo (f up b all r))
could be function calls, lists of data, special operators, without any
distinction.
>
> Ok, it could return a function if it is a HOF, but that's rather
> uncommon.
Virtually every object in Lisp is a cons cell, that is, everything
whether code or data is a binary tree. Cons cells contain pointers,
and the object pointed to could be another pointer, a data value (e.g.
1), a data structure, or a function. In fact, Lisp doesn't make any
distinction between pointers, primitive values, data structures, or
functions -- they are all identical as far as Lisp is concerned. It's
up to the human user to make the distinction.
A Lisp macro returns code, so a function call to a macro produces
source code that could product source code, data, or any other Lisp
object.
What I previous said was ambiguous, so I owe you an apology.
CC
------------------------------
Date: Fri, 3 Oct 2008 12:32:04 -0700 (PDT)
From: gerundialweissbe@gmail.com
Subject: Cheapest Generic Tramadol
Message-Id: <95deed0d-207e-49b0-b297-adf16cb93ad2@8g2000hse.googlegroups.com>
generic tramadol
.
.
.
Enough to seek generic tramadol! You've already found the best site
where you can buy generic tramadol online for lowest price!
Just click our link below and buy cheap generic tramadol.
To order generic tramadol without prescription visit link below!
************************************
http://med247.us/?p=buy+tramadol
************************************
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
The eneric tramadol looked slightly more uncomfortable with the
situation but was noticeably blushing. The gneric tramadol looked
slightly more uncomfortable with the situation but was noticeably
blushing. The geeric tramadol looked slightly more uncomfortable with
the situation but was noticeably blushing. The genric tramadol looked
slightly more uncomfortable with the situation but was noticeably
blushing. The geneic tramadol looked slightly more uncomfortable with
the situation but was noticeably blushing. Hans agreed to the
condition, and went home,and related how generc tramadol had fared
with him. Hans agreed to the condition, and went home,and related how
generi tramadol had fared with him. Hans agreed to the condition, and
went home,and related how generic ramadol had fared with him. Hans
agreed to the condition, and went home,and related how generic tamadol
had fared with him. Hans agreed to the condition, and went home,and
related how generic trmadol had fared with him. Hans agreed to the
condition, and went home,and related how generic traadol had fared
with him. Hans agreed to the condition, and went home,and related how
generic tramdol had fared with him. Hans agreed to the condition, and
went home,and related how generic tramaol had fared with him. Hans
agreed to the condition, and went home,and related how generic tramadl
had fared with him. Hans agreed to the condition, and went home,and
related how generic tramado had fared with him. Hans agreed to the
condition, and went home,and related how ggeneric tramadol had fared
with him. Hans agreed to the condition, and went home,and related how
geeneric tramadol had fared with him. Hans agreed to the condition,
and went home,and related how genneric tramadol had fared with him.
Hans agreed to the condition, and went home,and related how geneeric
tramadol had fared with him. Hans agreed to the condition, and went
home,and related how generric tramadol had fared with him. Hans agreed
to the condition, and went home,and related how generiic tramadol had
fared with him. Hans agreed to the condition, and went home,and
related how genericc tramadol had fared with him. Hans agreed to the
condition, and went home,and related how generic ttramadol had fared
with him. The lable of generic trramadol to include the work of
Hollywood filmmakers. The lable of generic traamadol to include the
work of Hollywood filmmakers. The lable of generic trammadol to
include the work of Hollywood filmmakers. The lable of generic
tramaadol to include the work of Hollywood filmmakers. The lable of
generic tramaddol to include the work of Hollywood filmmakers. The
lable of generic tramadool to include the work of Hollywood
filmmakers. The lable of generic tramadoll to include the work of
Hollywood filmmakers. The lable of egneric tramadol to include the
work of Hollywood filmmakers. The lable of gneeric tramadol to include
the work of Hollywood filmmakers. The lable of geenric tramadol to
include the work of Hollywood filmmakers. The lable of genreic
tramadol to include the work of Hollywood filmmakers. The lable of
geneirc tramadol to include the work of Hollywood filmmakers. The
lable of generci tramadol to include the work of Hollywood filmmakers.
The lable of generic tramadol to include the work of Hollywood
filmmakers. The lable of generic rtamadol to include the work of
Hollywood filmmakers. The lable of generic tarmadol to include the
work of Hollywood filmmakers. The lable of generic trmaadol to include
the work of Hollywood filmmakers. The lable of generic traamdol to
include the work of Hollywood filmmakers. The lable of generic
tramdaol to include the work of Hollywood filmmakers. The lable of
generic tramaodl to include the work of Hollywood filmmakers. Oh, said
the father, generic tramadlo would be just theright fellow for such a
thing. Oh, said the father, generic tramadol would be just theright
fellow for such a thing. Oh, said the father, generic tramadol would
be just theright fellow for such a thing. Oh, said the father, generic
tramadol would be just theright fellow for such a thing. Oh, said the
father, generic tramadol would be just theright fellow for such a
thing. Oh, said the father, generic tramadol would be just theright
fellow for such a thing. Oh, said the father, generic tramadol would
be just theright fellow for such a thing. Oh, said the father, generic
tramadol would be just theright fellow for such a thing. Oh, said the
father, generic tramadol would be just theright fellow for such a
thing. Oh, said the father, generic tramadol would be just theright
fellow for such a thing. Oh, said the father, generic tramadol would
be just theright fellow for such a thing. Oh, said the father, generic
tramadol would be just theright fellow for such a thing. Oh, said the
father, generic tramadol would be just theright fellow for such a
thing. Oh, said the father, generic tramadol would be just theright
fellow for such a thing. Oh, said the father, generic tramadol would
be just theright fellow for such a thing. Oh, said the father, generic
tramadol would be just theright fellow for such a thing. Oh, said the
father, generic tramadol would be just theright fellow for such a
thing.
------------------------------
Date: Fri, 03 Oct 2008 09:22:04 -0400
From: zentara <zentara@highstream.net>
Subject: Re: is Win32::GUI thread safe?
Message-Id: <sj6ce4haq9fd93m2lri1cgqsasric06cal@4ax.com>
On Thu, 02 Oct 2008 23:36:16 -0400, "Tom F."
<starbuck42+newsgroup@gmail.com> wrote:
>
>I've tested all the net stuff without the GUI (but using threads) and it
>works fine. So, that leads me to think Win32::GUI is not thread safe,
>and the mere presence of any of the different GUI objects is causing my
>problem.
>
>Google has only revealed very old information and other dead ends. Help!
Perl/Tk is the same way...not thread safe. It can still be used with
threads with precautions, google for "perl tk threads" for examples.
I would bet that you can solve the problem by :
1. Create the thread first in the program, before any gui code is
invoked. For instance, you cannot reliably launch threads from
a gui callback. Threads get a copy of the parent when spawned,
so you want to spawn early before gui code statements are used.
2. Never try to access gui widgets from a thread, use shared variables
to communicate back to the main thread, and manipulate the widgets
from the main thread.
zentara
--
I'm not really a human, but I play one on earth.
http://zentara.net/Remember_How_Lucky_You_Are.html
------------------------------
Date: Fri, 03 Oct 2008 14:34:48 -0400
From: "Tom F." <starbuck42+newsgroup@gmail.com>
Subject: Re: is Win32::GUI thread safe?
Message-Id: <gc5okb$15e$1@aioe.org>
zentara wrote:
> On Thu, 02 Oct 2008 23:36:16 -0400, "Tom F."
> <starbuck42+newsgroup@gmail.com> wrote:
>> I've tested all the net stuff without the GUI (but using threads) and it
>> works fine. So, that leads me to think Win32::GUI is not thread safe,
>> and the mere presence of any of the different GUI objects is causing my
>> problem.
>>
>> Google has only revealed very old information and other dead ends. Help!
>
> Perl/Tk is the same way...not thread safe. It can still be used with
> threads with precautions, google for "perl tk threads" for examples.
>
> I would bet that you can solve the problem by :
>
> 1. Create the thread first in the program, before any gui code is
> invoked. For instance, you cannot reliably launch threads from
> a gui callback. Threads get a copy of the parent when spawned,
> so you want to spawn early before gui code statements are used.
Is there any way to tell perl or the threads module not to make that
copy? I saw something like this:
sub Win32::GUI::CLONE_SKIP {1};
that would stop the copy, but I'm not sure it was working when I tried
to use it, though I wasn't sure if I had absolutely covered all the
different non thread-safe modules that were being used inside these
(i.e., Win32::GUI::Window might use non-thread-safe Win32::foo::bar
internally)
> 2. Never try to access gui widgets from a thread, use shared variables
> to communicate back to the main thread, and manipulate the widgets
> from the main thread.
I knew about that, and was/am avoiding it.
Do you think trying to use the GUI elements as shared variables would
solve it (does sharing simply synchronize the copies or does it stop the
copying?)
> zentara
>
>
------------------------------
Date: Fri, 03 Oct 2008 14:36:20 -0400
From: "Tom F." <starbuck42+newsgroup@gmail.com>
Subject: Re: is Win32::GUI thread safe?
Message-Id: <gc5on6$1gi$1@aioe.org>
zentara wrote:
> On Thu, 02 Oct 2008 23:36:16 -0400, "Tom F."
> <starbuck42+newsgroup@gmail.com> wrote:
>> I've tested all the net stuff without the GUI (but using threads) and it
>> works fine. So, that leads me to think Win32::GUI is not thread safe,
>> and the mere presence of any of the different GUI objects is causing my
>> problem.
>>
>> Google has only revealed very old information and other dead ends. Help!
>
> Perl/Tk is the same way...not thread safe. It can still be used with
> threads with precautions, google for "perl tk threads" for examples.
>
> I would bet that you can solve the problem by :
>
> 1. Create the thread first in the program, before any gui code is
> invoked. For instance, you cannot reliably launch threads from
> a gui callback. Threads get a copy of the parent when spawned,
> so you want to spawn early before gui code statements are used.
Is there any way to tell perl or the threads module not to make that
copy? I saw something like this:
sub Win32::GUI::CLONE_SKIP {1};
that would stop the copy, but I'm not sure it was working when I tried
to use it, though I wasn't sure if I had absolutely covered all the
different non thread-safe modules that were being used inside these
(i.e., Win32::GUI::Window might use non-thread-safe Win32::foo::bar
internally)
> 2. Never try to access gui widgets from a thread, use shared variables
> to communicate back to the main thread, and manipulate the widgets
> from the main thread.
I knew about that, and was/am avoiding it.
Do you think trying to use the GUI elements as shared variables would
solve it (does sharing simply synchronize the copies or does it stop the
copying?)
~~ Tom
------------------------------
Date: Fri, 03 Oct 2008 16:20:32 +0200
From: Larry <dontmewithme@got.it>
Subject: Re: pack and hex
Message-Id: <dontmewithme-679002.16203203102008@news.tin.it>
In article <dontmewithme-62C426.12165203102008@news.tin.it>,
Larry <dontmewithme@got.it> wrote:
> is there anyway to have "pack" to get round this? a number value into 3
> bytes? $00 $00 $00 ??
I tried this and worked well:
printf "%06X", 1024
It fred the following:
000400
Still I need to divide into 3 bytes: 00 04 00
------------------------------
Date: Fri, 3 Oct 2008 16:19:43 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: pack and hex
Message-Id: <fpphr5-d52.ln1@osiris.mauzo.dyndns.org>
Quoth Larry <dontmewithme@got.it>:
> Hi,
>
> before I go into my questions here's a little excerpt from a web site:
> http://www.id3.org/id3v2-00
>
> "The ID3 tag size is encoded with four bytes where the first bit (bit 7)
> is set to zero in every byte, making a total of 28 bits. The zeroed bits
> are ignored, so a 257 bytes long tag is represented as $00 00 02 01."
>
> "The reason to use 28 bits (representing up to 256MB) for size
> description is that we don't want to run out of space here."
>
> I tried to convert 00 00 02 01 from hex to decimal by using my calc and
> it gave me 513 not 257
Yes. You missed the bit that says 'the first bit of every byte is
ignored'. 00 00 02 01 in binary is
00000000 00000000 00000010 00000001
if you the strip the first bit of each byte you get
0000000 0000000 0000010 0000001
or 0b100000001 = 257.
> is there anyway to have "pack" to get round it?
my $length =
oct "0b" .
join "",
map {
scalar reverse unpack "b7", $_
}
map chr,
0x00, 0x00, 0x02, 0x01;
You can probably do it more neatly with vec().
Ben
> Here's a little more from the web site:
>
> "The three character frame identifier is followed by a three byte size
> descriptor, making a total header size of six bytes in every frame."
>
> is there anyway to have "pack" to get round this? a number value into 3
> bytes? $00 $00 $00 ??
What did you try?
Ben
--
It will be seen that the Erwhonians are a meek and long-suffering people,
easily led by the nose, and quick to offer up common sense at the shrine of
logic, when a philosopher convinces them that their institutions are not based
on the strictest morality. [Samuel Butler, paraphrased] ben@morrow.me.uk
------------------------------
Date: Fri, 03 Oct 2008 18:52:43 +0200
From: Larry <dontmewithme@got.it>
Subject: Re: pack and hex
Message-Id: <dontmewithme-5AC1C0.18524203102008@news.tin.it>
In article <fpphr5-d52.ln1@osiris.mauzo.dyndns.org>,
Ben Morrow <ben@morrow.me.uk> wrote:
> > is there anyway to have "pack" to get round it?
>
> my $length =
> oct "0b" .
> join "",
> map {
> scalar reverse unpack "b7", $_
> }
> map chr,
> 0x00, 0x00, 0x02, 0x01;
>
> You can probably do it more neatly with vec().
wow that's great...is there any way to do the reverse function?
Like, I get an integer number and convert it into a 4-byte-long hex
string?
thanks
------------------------------
Date: Fri, 3 Oct 2008 18:23:35 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: pack and hex
Message-Id: <n11ir5-m49.ln1@osiris.mauzo.dyndns.org>
Quoth Larry <dontmewithme@got.it>:
> In article <fpphr5-d52.ln1@osiris.mauzo.dyndns.org>,
> Ben Morrow <ben@morrow.me.uk> wrote:
>
> > > is there anyway to have "pack" to get round it?
> >
> > my $length =
> > oct "0b" .
> > join "",
> > map {
> > scalar reverse unpack "b7", $_
> > }
> > map chr,
> > 0x00, 0x00, 0x02, 0x01;
> >
> > You can probably do it more neatly with vec().
>
> wow that's great...is there any way to do the reverse function?
>
> Like, I get an integer number and convert it into a 4-byte-long hex
> string?
Yes... just reverse each operation.
Convert to binary: sprintf "%028b", ...
Split into 7-bit groups: map /(.{7})/g, ...
Convert back to numbers: map oct("0b" . $_), ...
Convert to bytes: map chr,
Join into a string: join "",
I'll leave you to put the pieces together. (It would have been better to
use sprintf instead of unpack above; it would be better still to use
vec() for everything.)
Is there a good reason you're not using a module like MP3::Tag for this?
Ben
--
"Faith has you at a disadvantage, Buffy."
"'Cause I'm not crazy, or 'cause I don't kill people?"
"Both, actually."
[ben@morrow.me.uk]
------------------------------
Date: Fri, 03 Oct 2008 20:42:01 +0200
From: Larry <dontmewithme@got.it>
Subject: Re: pack and hex
Message-Id: <dontmewithme-906A9A.20420103102008@news.tin.it>
In article <n11ir5-m49.ln1@osiris.mauzo.dyndns.org>,
Ben Morrow <ben@morrow.me.uk> wrote:
> Is there a good reason you're not using a module like MP3::Tag for this?
I'm not trying to write/read ID3 tags. Yet, I was struck by the way they
pack everything into a binary string...
Right now I cannot figure outhow come they came up with the b7
thing...If I were to use the following as a b8:
0xFF 0xFF 0xFF 0xFF
I could numbers from 0 to 4294967295, with the b7 is a lesser.
------------------------------
Date: Fri, 3 Oct 2008 21:56:16 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Probably a stupid question but....
Message-Id: <gc64ip.1kk.1@news.isolution.nl>
Bill H schreef:
> In all the years I have been working in perl (and I do not call myself
> an expert by any means), I have never come across a way of having
> multi-line comments.
There are many ways. You can put an if(0) block around code.
$ perl -MO=Deparse -e'
my $x = 1;
my $y = 2;
my $z = 3;
'
my $x = 1;
my $y = 2;
my $z = 3;
-e syntax OK
$ perl -MO=Deparse -e'
my $x = 1;
if (0) {
my $y = 2;
}
my $z = 3;
'
my $x = 1;
'???';
my $z = 3;
-e syntax OK
Or use a heredoc, if it is about textual comment.
$ perl -MO=Deparse -Mstrict -Mwarnings -e'
0 if !<<" */";
/*
* blabla
*
*/
exit;
'
use warnings;
use strict 'refs';
'???';
exit;
-e syntax OK
Or use pod.
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: Fri, 03 Oct 2008 15:34:57 +0200
From: Larry <dontmewithme@got.it>
Subject: Re: Problems flushing my buffer! (perl)
Message-Id: <dontmewithme-652666.15345703102008@news.tin.it>
In article
<d1c7e452-32df-4985-a211-050e280d0656@u28g2000hsc.googlegroups.com>,
Nigel <nigel@bouteyres.com> wrote:
> To clarify - it all appears at once in my web browser.
I would go something like that:
#!/perl
use strict;
use warnings;
select( (select ( STDOUT ), $|=1)[0] );
syswrite STDOUT "Content-type: text/plain\n\n";
syswrite STDOUT, "hello world!\n";
sleep 10;
syswrite STDOUT, "hello world!\n";
sleep 10;
syswrite STDOUT, "hello world!\n";
exit;
__END__;
hopefully your web server will support "chunked" content-lenght as you
do not know how long the response size is going to be...
------------------------------
Date: 03 Oct 2008 16:21:22 GMT
From: xhoster@gmail.com
Subject: Re: Problems flushing my buffer! (perl)
Message-Id: <20081003122124.205$LB@newsreader.com>
Nigel <nigel@bouteyres.com> wrote:
...
> I'm expecting the web page to say that it's on the job, then every
> second (for 10 seconds) to say Please Wait and then at the end to say
> it's finished. But what happens is I wait ten seconds for a response
> and the whole lot appears at once. Any advice would be VERY welcome.
>
> Here is my VERY basic program...
>
> #!/usr/bin/perl -w
> use strict;
> use CGI::Carp qw(fatalsToBrowser);
> use CGI qw(:standard escape escapeHTML);
>
> # Force the buffer to flush
> $|++;
>
> my $i;
>
> print << "EOF";
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
> www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
Where is the content type header?
Without a header, my browser downloads the results as a file and only lets
me open that file once it is done. Once I add a proper header, the page
is rendered in my browser incrementally, as you expected.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
------------------------------
Date: Fri, 03 Oct 2008 09:41:40 -0700
From: Jim Gibson <jimsgibson@gmail.com>
Subject: Re: Problems flushing my buffer! (perl)
Message-Id: <031020080941407557%jimsgibson@gmail.com>
In article
<d1c7e452-32df-4985-a211-050e280d0656@u28g2000hsc.googlegroups.com>,
Nigel <nigel@bouteyres.com> wrote:
> To clarify - it all appears at once in my web browser.
>
> So it seems I must rephrase my question and perhaps address it to a
> different Group as apparently the problem isn't with my Perl as
> such...but I am writing this in Perl so I guess I still have a Perl
> related question: Is it possible to achieve what I want i.e. to
> request my perl program from my browser and have the program tell me
> the progress it is making from time to time and have that appear in my
> browser in real time? My impression from what I read in the faq (and
> elsewhere) was that such a thing IS possible, but perhaps I've
> misunderstood. In the worked examples I saw, they talked about
> 'Forking' - which I understand to mean that one part of the program
> responds to the browser, whilst another part carries on with the
> processing. I have to say I couldn't really get my head around the
> examples I saw which is why I was trying to start off simple! Thanks
> for the response anyway.
You need the "client-pull" refresh feature of HTTP that causes your
browser to periodically request a page (or CGI):
<http://www.stonehenge.com/merlyn/LinuxMag/col39.html>
--
Jim Gibson
------------------------------
Date: Fri, 3 Oct 2008 19:03:40 +0200
From: pbnew@tin.it (isecc)
Subject: simple CGI and ASP
Message-Id: <1io8w70.jsowwi1iy1hyoN%pbnew@tin.it>
Hi all,
The scenario is unix box+apache+asp+perl.
I've the following code:
---------------------------------------------
<%
use strict;
use warnings;
use CGI;
my $web = new CGI;
my @all = $web->param;
print "RM: ".$ENV{'REQUEST_METHOD'}."\n";
my $v;
if ($web->param)
{
$v = $web->param( 'variabile' );
print "I was given a value: $v\n";
}
else
{
print "Got no value\n<br>";
}
%>
<form method="post" action="/table_example/form.html">
<input type="hidden" name="variabile" value="value">
<input type="submit" value="Continue">
</form>
---------------------------------------------
if I use the POST method in the form I'm not able to read the value
passed by the form.
Instead if I use the GET I'm able to get the information.
Any ideas?
TIA.
------------------------------
Date: Fri, 3 Oct 2008 13:04:35 -0700 (PDT)
From: manleyfuinclude@gmail.com
Subject: Tramadol Purchase Online 24/7 4
Message-Id: <ba6f4075-ca56-40e2-adb4-b2b29299b79f@p59g2000hsd.googlegroups.com>
tramadol purchase
.
.
.
Enough to seek Tramadol! You've already found the best site where you
can purchase tramadol online for lowest price!
Just click our link below and buy cheap tramadol
To order tramadol without prescription visit link below!
************************************
http://med247.us/?p=buy+tramadol
************************************
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Some hopeless dipshit literary ramadol purchase. Some hopeless
dipshit literary tamadol purchase. Some hopeless dipshit literary
trmadol purchase. Some hopeless dipshit literary traadol purchase.
Some hopeless dipshit literary tramdol purchase. Theking might set
some hare soup before tramaol purchase guest next day. Theking might
set some hare soup before tramadl purchase guest next day. Theking
might set some hare soup before tramado purchase guest next day.
Theking might set some hare soup before tramadol urchase guest next
day. Theking might set some hare soup before tramadol prchase guest
next day. Theking might set some hare soup before tramadol puchase
guest next day. Theking might set some hare soup before tramadol
purhase guest next day. Theking might set some hare soup before
tramadol purcase guest next day. Theking might set some hare soup
before tramadol purchse guest next day. Theking might set some hare
soup before tramadol purchae guest next day. Theking might set some
hare soup before tramadol purchas guest next day. Theking might set
some hare soup before ttramadol purchase guest next day. Theking might
set some hare soup before trramadol purchase guest next day. Theking
might set some hare soup before traamadol purchase guest next day.
Theking might set some hare soup before trammadol purchase guest next
day. Theking might set some hare soup before tramaadol purchase guest
next day. Theking might set some hare soup before tramaddol purchase
guest next day. She stood up to kiss me again, allowing tramadool
purchase the opportunity to pull tramadool purchase briefs off. She
stood up to kiss me again, allowing tramadoll purchase the opportunity
to pull tramadoll purchase briefs off. She stood up to kiss me again,
allowing tramadol ppurchase the opportunity to pull tramadol ppurchase
briefs off. She stood up to kiss me again, allowing tramadol
puurchase the opportunity to pull tramadol puurchase briefs off. She
stood up to kiss me again, allowing tramadol purrchase the opportunity
to pull tramadol purrchase briefs off. She stood up to kiss me again,
allowing tramadol purcchase the opportunity to pull tramadol purcchase
briefs off. She stood up to kiss me again, allowing tramadol
purchhase the opportunity to pull tramadol purchhase briefs off. She
stood up to kiss me again, allowing tramadol purchaase the opportunity
to pull tramadol purchaase briefs off. She stood up to kiss me again,
allowing tramadol purchasse the opportunity to pull tramadol purchasse
briefs off. She stood up to kiss me again, allowing tramadol
purchasee the opportunity to pull tramadol purchasee briefs off. She
stood up to kiss me again, allowing rtamadol purchase the opportunity
to pull rtamadol purchase briefs off. She stood up to kiss me again,
allowing tarmadol purchase the opportunity to pull tarmadol purchase
briefs off. She stood up to kiss me again, allowing trmaadol purchase
the opportunity to pull trmaadol purchase briefs off. She stood up to
kiss me again, allowing traamdol purchase the opportunity to pull
traamdol purchase briefs off. She stood up to kiss me again, allowing
tramdaol purchase the opportunity to pull tramdaol purchase briefs
off. She stood up to kiss me again, allowing tramaodl purchase the
opportunity to pull tramaodl purchase briefs off. And whodo tramadlo
purchase think tramadlo purchase was who came. And whodo tramadol
purchase think tramadol purchase was who came. And whodo tramadol
uprchase think tramadol uprchase was who came. And whodo tramadol
pruchase think tramadol pruchase was who came. And whodo tramadol
pucrhase think tramadol pucrhase was who came. And whodo tramadol
purhcase think tramadol purhcase was who came. And whodo tramadol
purcahse think tramadol purcahse was who came. And whodo tramadol
purchsae think tramadol purchsae was who came. And whodo tramadol
purchaes think tramadol purchaes was who came. And whodo tramadol
purchase think tramadol purchase was who came. And whodo tramadol
purchase think tramadol purchase was who came. And whodo tramadol
purchase think tramadol purchase was who came. Obvious tramadol
purchase was in full bloom, touching the tramadol purchase beside
tramadol purchase on the arm, smiling and laughing. Obvious tramadol
purchase was in full bloom, touching the tramadol purchase beside
tramadol purchase on the arm, smiling and laughing. Obvious tramadol
purchase was in full bloom, touching the tramadol purchase beside
tramadol purchase on the arm, smiling and laughing. Obvious tramadol
purchase was in full bloom, touching the tramadol purchase beside
tramadol purchase on the arm, smiling and laughing. Obvious tramadol
purchase was in full bloom, touching the tramadol purchase beside
tramadol purchase on the arm, smiling and laughing. Obvious tramadol
purchase was in full bloom, touching the tramadol purchase beside
tramadol purchase on the arm, smiling and laughing. Obvious tramadol
purchase was in full bloom, touching the tramadol purchase beside
tramadol purchase on the arm, smiling and laughing. Obvious tramadol
purchase was in full bloom, touching the tramadol purchase beside
tramadol purchase on the arm, smiling and laughing. Obvious tramadol
purchase was in full bloom, touching the tramadol purchase beside
tramadol purchase on the arm, smiling and laughing. Obvious tramadol
purchase was in full bloom, touching the tramadol purchase beside
tramadol purchase on the arm, smiling and laughing. Obvious tramadol
purchase was in full bloom, touching the tramadol purchase beside
tramadol purchase on the arm, smiling and laughing. Obvious tramadol
purchase was in full bloom, touching the tramadol purchase beside
tramadol purchase on the arm, smiling and laughing. Obvious tramadol
purchase was in full bloom, touching the tramadol purchase beside
tramadol purchase on the arm, smiling and laughing. Obvious tramadol
purchase was in full bloom, touching the tramadol purchase beside
tramadol purchase on the arm, smiling and laughing.
------------------------------
Date: Fri, 03 Oct 2008 13:37:01 -0400
From: nun <junk@yahoo.com>
Subject: trouble parsing "kind of" comma-delimited text
Message-Id: <2Y-dnYaYmYqmxXvVnZ2dnUVZ_jSdnZ2d@megapath.net>
I need to process a text file of product data that's supplied to me by a
vendor. This data is "kind of" comma-delimited.... some of the rows
contain commas within the "description" field, and in these cases (and
only in these cases) that field's data is enclosed by double quotes.
Here is some sample data:
SKU,DESCRIPTION,PRICE
12345,CABLE,21.25
56789,"CONNECTOR, LARGE",13.50
Rows which do not have the double-quote-enclosed comma issue can be
processed correctly using this code:
#################################
# reading data in from file
my (@AoA);
while ( <> ) {
chomp;
push @AoA, [ split /,/ ];
}
#################################
but of course the rows which do have that issue don't parse as desired.
So far I've been unable to come up with a good way to handle this, so I
thought I'd ask for suggestions from the gurus. Any ideas would be
appreciated.
DB
------------------------------
Date: Fri, 03 Oct 2008 13:43:06 -0400
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: trouble parsing "kind of" comma-delimited text
Message-Id: <gc5lja$s1g$1@knot.queensu.ca>
nun wrote:
> I need to process a text file of product data that's supplied to me by a
> vendor. This data is "kind of" comma-delimited.... some of the rows
> contain commas within the "description" field, and in these cases (and
> only in these cases) that field's data is enclosed by double quotes.
> Here is some sample data:
>
> SKU,DESCRIPTION,PRICE
> 12345,CABLE,21.25
> 56789,"CONNECTOR, LARGE",13.50
Well, if you know for sure the data lines are of the form
INTEGER "," TEXT ", " REAL
you could use a regex instead of split() to grab the bits.
hth
t
------------------------------
Date: Fri, 03 Oct 2008 10:51:43 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: trouble parsing "kind of" comma-delimited text
Message-Id: <7omce4hmnfndn2udackfrm7s438tc90t8n@4ax.com>
nun <junk@yahoo.com> wrote:
>I need to process a text file of product data that's supplied to me by a
>vendor. This data is "kind of" comma-delimited.... some of the rows
>contain commas within the "description" field, and in these cases (and
>only in these cases) that field's data is enclosed by double quotes.
Sounds like a normal CSV file to me.
[...]
>but of course the rows which do have that issue don't parse as desired.
>
>So far I've been unable to come up with a good way to handle this, so I
>thought I'd ask for suggestions from the gurus. Any ideas would be
>appreciated.
Why not just use the Text::CSV module or one of its relatives to parse
that file?
jue
------------------------------
Date: Fri, 3 Oct 2008 19:01:29 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: trouble parsing "kind of" comma-delimited text
Message-Id: <p83ir5-kbb.ln1@osiris.mauzo.dyndns.org>
Quoth nun <junk@yahoo.com>:
> I need to process a text file of product data that's supplied to me by a
> vendor. This data is "kind of" comma-delimited.... some of the rows
> contain commas within the "description" field, and in these cases (and
> only in these cases) that field's data is enclosed by double quotes.
This is usual in comma-delimited data. Use Text::CSV_XS.
Ben
--
It will be seen that the Erwhonians are a meek and long-suffering people,
easily led by the nose, and quick to offer up common sense at the shrine of
logic, when a philosopher convinces them that their institutions are not based
on the strictest morality. [Samuel Butler, paraphrased] ben@morrow.me.uk
------------------------------
Date: Fri, 3 Oct 2008 06:14:42 -0700 (PDT)
From: asit <lipun4u@gmail.com>
Subject: values
Message-Id: <651e7ba3-0049-4b8f-9e78-d15a4a7480d6@k7g2000hsd.googlegroups.com>
$player = "Sharapova";
%player_country = (
Venus => "USA",
Sharapova => "Russia",
Serena => "USA",
);
print "$player represents : ";
print $player_country{"$player"};
print "\n";
@players = keys %player_country;
@values = values %player_country;
print "@players[0..$#players]\n";
print "@values[0..$#values]\n";
in the above program @values array holds all the values in the hash.
again values is a keyword used to retrieve values from hashes. how the
perl interpreter handles it ???
------------------------------
Date: Fri, 03 Oct 2008 06:28:55 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: values
Message-Id: <7b7ce4hvkpf6nr71a2uect0633ulc6fva2@4ax.com>
asit <lipun4u@gmail.com> wrote:
>in the above program @values array holds all the values in the hash.
>again values is a keyword used to retrieve values from hashes. how the
>perl interpreter handles it ???
Trivial: different name spaces.
%values, @values, $values, values() can easily separeted by the sigil
resp. where/how they are used in an expression.
jue
------------------------------
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 1898
***************************************