[29445] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 689 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 27 06:09:48 2007

Date: Fri, 27 Jul 2007 03:09:15 -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, 27 Jul 2007     Volume: 11 Number: 689

Today's topics:
    Re: @arts <bik.mido@tiscalinet.it>
    Re: @arts <bik.mido@tiscalinet.it>
    Re: @arts anno4000@radom.zrz.tu-berlin.de
    Re: @arts <bik.mido@tiscalinet.it>
    Re: @arts <bik.mido@tiscalinet.it>
    Re: Assignments with $_ using substitution <bik.mido@tiscalinet.it>
    Re: Assignments with $_ using substitution <wahab-mail@gmx.net>
    Re: Difference between two values in a column in Perl <admiralcap@gmail.com>
        ERR: 13: Missing right $] <pp@mm.org>
    Re: ERR: 13: Missing right $] <peter@makholm.net>
    Re: ERR: 13: Missing right $] <pp@mm.org>
    Re: fork command. anno4000@radom.zrz.tu-berlin.de
    Re: Perl with DBI <spamtrap@dot-app.org>
    Re: pid from startet process <josef.moellers@fujitsu-siemens.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 27 Jul 2007 09:34:11 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: @arts
Message-Id: <0d7ja3pvv9av1g5j657ppp2ke6dq9hjman@4ax.com>

On Thu, 26 Jul 2007 18:49:34 -0700, "Wade Ward" <zaxfuuq@invalid.net>
wrote:

>> Please don't spoil for people like me who is likely to have a year or
>> more to wait before seeing the show.
>I met Matt Groening's cousin while I lived in St. Paul.  She says that 
>people in the cartoon are plucked right out of the family, and it was just 

Well, mostly as far as names are concerned. I read the whole story.
M.G. had a long time creation of his that was noticed by one of the
producers of that famous talk show... or something like that. Then he
was asked to prepare a series of shorts for the show, but fearing to
possibly lose right on his historical comic, he drew something
completely anew as a sketch on a sheet of paper, in just as few as
bunch of seconds - giving the characters the names of his family, with
one notable exception! And the animators took them and used them as
they were drawn, verbatim: charachter design was very different back
then, and much rougher.

>obvious, like the chain-smoking in-laws.  She was afraid to go to family 
>reunions because she didn't want to end up as some unflattering character in 
>his cartoons.  I think it's one of the few productions that's lasted as long 

:-)

>as it has while maintaining quality.

Well, the last season I could see here in Italy, which should be the
XVII one, somewhat deluded me: granted, I'm a big fan of the show and
I've been for such a long time, and I think I will always be. But I
had the impression that it was beginning to eventually lose some
momentum wrt say a few seasons ago. I'm still eagerly waiting the
movie, which will be here in September.


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: Fri, 27 Jul 2007 09:41:48 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: @arts
Message-Id: <pd8ja3hrraji8k1uhjegf6i2v5jvdv7udt@4ax.com>

On Thu, 26 Jul 2007 18:32:50 -0700, "Wade Ward" <zaxfuuq@invalid.net>
wrote:

>This shows a more compact assignment than I had with
>>  my ($last, $first)=(7,2);

I'm not sure if I understand what you mean. Is that supposed to be a
question? Well, in any case the above is a plain, common list
assignment. I hope that at least this one is clear enough.

>>  {
>>      my $i;
>>      sub i () : lvalue { $i }
>>  }
>How does this not have a name?

What, precisely, doesn't have a name?


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: 27 Jul 2007 08:10:13 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: @arts
Message-Id: <5gtnj5F3he8e4U1@mid.dfncis.de>

Mike Hartsough <michaellhartsough@sbcglobal.net> wrote in comp.lang.perl.misc:
> Michele Dondi wrote:
> > On Thu, 26 Jul 2007 09:49:00 -0700, "Mike Hartsough"
> > <michaellhartsough@sbcglobal.net> wrote:
> [snip]
> > > making about your quoting attributions? He even quoted the posting
> >
> > Very very little, trust me. Perhaps was it a reasonable, respectful
> > person,
> 
> You were asked nicely by a two people, so where was the problem?
                           ^^^^^
Interesting typo!

Anno


------------------------------

Date: Fri, 27 Jul 2007 09:45:44 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: @arts
Message-Id: <ci8ja3tmivsoph2lmddsu4h1polq5mjsls@4ax.com>

On Thu, 26 Jul 2007 18:20:21 -0700, "Wade Ward" <zaxfuuq@invalid.net>
wrote:

>Of course 'for' is a keyword.  It was the 'reverse' that I was looking at, 
>along with the aliasing.  I thnik this little script illuminates the point:

Well, reverse() is nothing but a function (except for some
optimization sugar) which, in list context, reverses the list it's
passed. Aliasing is a whole different matter, and is completely
orthogonal.


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: Fri, 27 Jul 2007 11:33:03 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: @arts
Message-Id: <4bcja3pthgrp8lg89ti5iver0fca3e1gn5@4ax.com>

On Fri, 27 Jul 2007 00:54:10 GMT, "Mike Hartsough"
<michaellhartsough@sbcglobal.net> wrote:

>You were asked nicely by a two people, so where was the problem?

If you were asked nicely by "a two people" (on USENET!!!) to stick a
pen up your ass, would you do it? You stripped very accurately the
part of my post in which I went into details explaining why I though
and I *think* that the kind of attribution you're requesting is more
noise than anything useful. Just confute my reasoning with rational
arguments, as in a mathematical proof, and I'll accomplish.

>So what? Is it impossible to just be pleasant and make a better example 
>of how to handle things? I.e., "A: Please attribute your quotes. B: Ok, 
>I will try, thank you." What was stopping you from responding in such a 
>way?

Rationality. If something is not deserved, not useful and no one but a
thingie called "vronans" (up to that point) requests it, then I'm not
seconding the request.

>> Well, you know, I hardly ever mention the posting guidelines nor
>> direct people towards them: you can check by searching my past posts.
>
>I did, and you have on many occasions directed people to them:
>
>http://groups.google.com/groups?as_q=&num=100&hl=en&as_epq=posting+guidelines&as_uauthors=Michele+Dondi

Well, for one thing the search you're suggesting turned out 16, I say
*16* results. If you search

http://groups.google.com/groups?q=author%3AMichele+author%3ADondi+group%3Acomp.lang.perl.misc&num=100

instead, you'll find 2250, I say *2250*. Do those sixteen qualify as
"many"?!? Are you joking?

Let's go on: I contend that many of your results are false positives.
Don't you believe me? Please follow me (or will you skip this section
altoghether?) Here are the posts returned by your search, in order and
fully (but the .sig and the tiny "sig" I put above the latter) quoted:


http://tinyurl.com/2xcwvp

: On Thu, 08 Mar 2007 23:15:49 GMT, "A. Sinan Unur"
: 
: <1...@llenroc.ude.invalid> wrote:
: >My post was both a reflection of my elation and re-realization that if I
: >just start preparing a post for this group when I get stuck, I will manage
: >to extricate myself without needing to actually post the question ;-)
: 
: Well, to mention a case that occurred to me quite recently, I had a
: oneliner I posted to someone else, featuring a lookahed. I can't
: remember what it was, exactly, but it may have been something along
: the lines of
: 
:   perl -lpe 's/\d+(?=bar$)//'
: 
: Only, when I layed it down, it was
: 
:   perl -lpe 's/\d+(?=bar)$//'
: 
: Obviously, the latter didn't work. But however stupid it may sound I
: couldn't understand why I had to write it as in the former to make it
: work. And I was about to write a post about this "issue" either here
: or in PerlMonks -I can't remember- when suddenly I asked myself: and
: if it were 'a' instead of '$'? And the answer was clear to me, and I
: saved an embarassing post. Only to postpone it up until... NOW!  :-) 

The Subject line, which was not concocted by *me*, contains "posting
guidelines". Am I directing anyone to them? Do I happen to even
mention them?


http://tinyurl.com/29znrn

: On Thu, 8 Mar 2007 21:00:24 +0000 (UTC), "A. Sinan Unur"
: 
: <1...@llenroc.ude.invalid> wrote:
: >The posting guidelines work. Problem solved. 1 Gb data file parsed and
: >reformatted.
: 
: Although many of us have a story like this to narrate, thanks for
: sharing. Sometimes I devise the solution myself while *composing* the
: post. (Not that I've really read the guidelines, ever. Just somehow
: follow them out of common sense, and possibly some sparse tip.) 

Am I directing anyone to the PG? Am I saying anything different from
what I also wrote here?


http://tinyurl.com/2yms6b

: On Fri, 28 Jul 2006 22:54:45 GMT, a...@white-eagle.invalid.uk wrote:
: >> I wrote a little script in Perl to make stats on a log file.  You can
: >> view the source at: http://pastebin.ca/104391 .  When running on an
: 
: >Would it be possible to amend the Posting Guidelines so that it is made
: >clear that posting URLs for scripts is unwanted and unnecessary and
: >that they should be posted to the group?
: 
: While I *do* prefer minimal example to be explicitly exhibited in the
: post one is sending to the group, I don't feel like *banning* links
: pointing to code in web pages altogether. Maybe a "it's strongly
: preferred" would be a better option. 

Ditto!


http://tinyurl.com/2lqln9

: >> named the Top Turds of comp.lang.perl.misc for 2007.
: 
: >Your list includes a troll (pg), which diminishes its credibility.
: 
: Haha! I would say it just contributes to its bullshittery...
: 
: >However, just out of curiosity, can you cite a single instance where
: >someone posted a message which conforms to the group's posting
: >guidelines and was treated rudely by anyone on your list (except the
: >troll)?
: 
: You know, I never insist too much on the posting guidelines -indeed I
: think you can hardly find a post of mine explicitly advocating, let
: alone mentioning, them-. For me it's all a matter of common sense. And
: I paraphrase your question asking whether one can cite a single
: instance of a SENSIBLY asked question which spawned rude replies. 

Ditto!


http://tinyurl.com/33oy9u

(Ok, this is too long, I will only include the section in which PG are
mentioned:)

: >Frankly, I don't care if you're annoyed by someone who posts above quoted
: >material in certain circumstances. It's not your place to correct me. You
: >entirely miss the point of posting guidelines. The guidelines are not rules
: 
: Did I happen to mention the posting guidelines? Please check, you'll
: see I didn't. I was and I am talking out of *common sense* and of
: maximizing communication efficiency. 

Ditto!


http://tinyurl.com/yvg2os

(Again too long)

: >> Have you seen the Posting Guidelines that are posted here frequently?
: 
: >Amazing, so many of the replies to my post were merely asking RTFM.
: 
: Yes, it's customary here. It makes discussion more efficient. It was
: not exactly about the FM, but about the posting guidelines, which in
: turn are not the Law, but comprise a series of recommendations out of
: common sense. Some poster do not even need them. Some are better
: pointed to them. Most knowledgeable, resourceful, helpful regulars
: here just prefer that one helps them to help him or her by respecting
: those guidelines. Live with that! If one has some problem with some
: code, then there's nothing unreasonable in wanting to see a minimal
: but complete amount of code exhibiting the problem. 

Ditto!


http://tinyurl.com/343qzg

: <benmor...@tiscali.co.uk> wrote:
: >> > And your .sig takes more than four lines, which many people consider
: >> > impolite and contrary to netiquette...
: >> >:-P
: 
: >> It is a single solitary newline in-between two blocks. It really does
: >> not affect bandwidth consumed (it is still less than the 320 bytes taken
: >> up by a 4 line 80 column sig). After all, the reason for the custom is
: >> to reduce the amount of bandwidth dedicated to vanity. Half of my sig is
: >> my email address, the other half is a link to the posting guidelines.
: 
: >The reason for the restriction is not just (or even mainly) because of
: >bandwidth, it is also to limit screen-estate use on 80x25 terminals,
: >which some of us still use.
: 
: Hey, wasn't it clear that I was mainly joking? :-) 

Ditto!


http://tinyurl.com/27nkqo

: On Mon, 11 Sep 2006 08:05:26 +0100, "Don Corleone" <d...@mastah.com>
: wrote:
: 
: >Subject: gah!
: 
: You've already been requested to read the posting guidelines for the
: group. *Please* put the subject of your post in the Subject: line -
: not that one should need to read the guidelines to know that it would
: be more effective, IMHO.
: 
: >Thanks for some of the comments.
: 
: About what?!? (Yes, I *do* know, but that's not the point.)
: 
: >In a nutshell this is what i am trying to make the program do:
: 
: [snip]
: 
: You know, reposting the exact same question in another thread is not
: going to help you. 

Ok, this may *slightly* qualify as directing one to the PG...


http://tinyurl.com/386otx

(long, snipped)

: >> Have you seen the Posting Guidelines that are posted here frequently?
: >Thanks Tad,
: 
: It seems you *didn't*.
: 
: *Please* at least do not top post!! (See the comment at the top.) 

Ditto! (The poster said "thanks", but then insisted on top-posting.)


http://tinyurl.com/26v39j

: On 6 Dec 2004 00:53:24 -0800, kiangl...@hotmail.com (Lim kiang Leng)
: wrote:
: 
: >I have a problem by using the perl command. Some time it hank with the
: >system command. such as below.
: 
: Define "to hank". This is not a joke: I'm not a native English speaker
: and I couldn't find it in my dictionary. May well be slang, but I'm
: not familiar with it.
: 
: More generally, the description of your problem is too vague: give
: more (but reasonably not too many) details.
: 
: Have you considered reading the posting guidelines?
: 
: >The command that make me hank was ,
: >`hostname`
: 
: As a general rule, do not *ab*use system() and/or qx//. Nothing wrong
: IMHO with this one, but maybe you could be interested in Sys::Hostname
: anyway... 

WHOA! On Dec 6 2004 11:59 am, I *did* actually, clearly and without
any doubt direct someone to the PG!

Should we go on?


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: Fri, 27 Jul 2007 09:51:41 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Assignments with $_ using substitution
Message-Id: <lq8ja3loscrusjilt0b9rhfs7b3smk0t0i@4ax.com>

On Thu, 26 Jul 2007 14:57:43 -0700, TonyV <kingskippus@gmail.com>
wrote:

>What's happening is that the substitution is occurring in $_ and the
>number of substitutions (1, in this case) is being assigned to $a.  Is
>there some more elegant way to assign the result of the substitution
>to $a without explicitly assigning $_ to it?

Well, not really. C<s///> applies a substitution to the variable it
is... well, applied to. You will have to wait for Perl 6's .subst
method to do differently. In the meanwhile, other than using a lexical
variable, you can play with C<local $_> (with a caveat) or with
C<for>'s aliasing properties, which become convenient if two or more
regex-like operators are applied.


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: Fri, 27 Jul 2007 10:23:04 +0200
From: Mirco Wahab <wahab-mail@gmx.net>
Subject: Re: Assignments with $_ using substitution
Message-Id: <f8cacj$lk4$1@mlucom4.urz.uni-halle.de>

TonyV wrote:
> ... is that the substitution is occurring in $_ and the
> number of substitutions (1, in this case) is being assigned to $a.  

which is a documented behaviour.

> Is there some more elegant way to assign the result 
> of the substitution to $a without explicitly assigning $_ to it?

You probably think of 'return a copy of the substitution'
directly to a new variable, like:

 ...
 sub substitute {(my $t=$_) =~ s/$_[0]/$_[1]/; $t}
 ...

 ...
 my @foo = qw{ don't even think about it};

 foreach (@foo) {
    if( /n/ ) {
        my $var = substitute 'n', 'nn';  # does work
        print $var,"\n"
    }
 }
 ...

Regards

M.


------------------------------

Date: Fri, 27 Jul 2007 01:11:12 -0700
From: Matt Madrid <admiralcap@gmail.com>
Subject: Re: Difference between two values in a column in Perl
Message-Id: <rvednR_lHp81NTTbnZ2dnUVZ_jKdnZ2d@comcast.com>

venkateshwar wrote:
> 
> I need to check if first value(ValA) is same in any of the consecutive
> values and then find the difference between valB of those two matched
> valA! and the next instant the difference should be between the valB
> of second one with third match.
> 
> For example in this set, 9 appears thrice. first time, the difference
> shd be printed as 3099  - 3000, the next time, it should be printed as
> 5098 - 3099.
> 
> valA,valB
> 9,3000
> 10,3010
> 1,3011
> 2,1020
> 3,3001
> 4,4010
> 9,3099
> 5,4011
> 18,4020
> 19,2044
> 20,3098
> 9,5098
> 
> How do I do this in Perl??
> 
> regards
> venkat.
> 

So I assume that you are only interested in "valA" values that appear
more than once, and that you actually want to do the math, and not just
print "3099 - 3000". This does both:

----------------------------------------------------------------------------
use strict;
use warnings;
use Data::Dumper;
my %data;
while (<DATA>) {
    next if /^\D/;
    push (@{$data{$1}},$2) if /(\d+),(\d+)/;
}

# Now you have a hash with each hey being the "valA" value
# and each value being a list of corresponding "valB" values.

foreach (keys(%data)) {
    if (scalar(@{$data{$_}}) > 1) {
	print "$_:\n";
	my @sorted = sort { $a <=> $b } @{$data{$_}};	
	for (my $i = 0; $i < scalar(@sorted); $i++) {
	   my ($a,$b) = ($sorted[$i],$sorted[$i+1]);
	   last unless $b;
	   print "($b - $a) = " . ($sorted[$i + 1] - $sorted[$i]) . "\n";
	}

    }
}

__DATA__
valA,valB
9,3000
10,3010
1,3011
2,1020
3,3001
4,4010
9,3099
5,4011
18,4020
19,2044
20,3098
9,5098
-----------------------------------------------------------------------------

Matt M.


------------------------------

Date: Fri, 27 Jul 2007 19:18:09 +1000
From: pp <pp@mm.org>
Subject: ERR: 13: Missing right $]
Message-Id: <13aje2itgvt250e@corp.supernews.com>


Hi,

Can anyone tell me how to fix this error in perl?
The above error point to the following line or perl code.

%UN_MONTH= map { lc($MONTH[$_]), $_ }  0..$#MONTH ;   # look up by month 
name

Thanks
Sam


------------------------------

Date: Fri, 27 Jul 2007 09:24:54 +0000
From: Peter Makholm <peter@makholm.net>
Subject: Re: ERR: 13: Missing right $]
Message-Id: <87ps2ekxll.fsf@hacking.dk>

pp <pp@mm.org> writes:

> Can anyone tell me how to fix this error in perl?
> The above error point to the following line or perl code.
>
> %UN_MONTH= map { lc($MONTH[$_]), $_ }  0..$#MONTH ;   # look up by
> month name

Works here:

makholm@makholm:~$ perl -w -MData::Dumper -le '@MONTH = qw(Jan Feb Mar Apr Maj Jun); %UN_MONTH= map { lc($MONTH[$_]), $_ }  0..$#MONTH ; print Dumper \%UN_MONTH;'
$VAR1 = {
          'feb' => 1,
          'jan' => 0,
          'jun' => 5,
          'mar' => 2,
          'apr' => 3,
          'maj' => 4
        };

makholm@makholm:~$ 

//Makholm


------------------------------

Date: Fri, 27 Jul 2007 19:30:08 +1000
From: pp <pp@mm.org>
Subject: Re: ERR: 13: Missing right $]
Message-Id: <13ajep17m6ukl14@corp.supernews.com>

Peter Makholm wrote:
> pp <pp@mm.org> writes:
> 
>> Can anyone tell me how to fix this error in perl?
>> The above error point to the following line or perl code.
>>
>> %UN_MONTH= map { lc($MONTH[$_]), $_ }  0..$#MONTH ;   # look up by
>> month name
> 
> Works here:
> 
> makholm@makholm:~$ perl -w -MData::Dumper -le '@MONTH = qw(Jan Feb Mar Apr Maj Jun); %UN_MONTH= map { lc($MONTH[$_]), $_ }  0..$#MONTH ; print Dumper \%UN_MONTH;'
> $VAR1 = {
>           'feb' => 1,
>           'jan' => 0,
>           'jun' => 5,
>           'mar' => 2,
>           'apr' => 3,
>           'maj' => 4
>         };
> 
> makholm@makholm:~$ 
> 
> //Makholm
hi
thanks for the prompt reply.
that error is generated by the script downloaded from the following web 
site:
http://www.jmarshall.com/tools/cgiproxy/

Are you able to get it working in  yoru system?

Thanks
P


------------------------------

Date: 27 Jul 2007 08:25:43 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: fork command.
Message-Id: <5gtog7F3he8e4U2@mid.dfncis.de>

Ted Zlatanov  <tzz@lifelogs.com> wrote in comp.lang.perl.misc:
> On 26 Jul 2007 11:29:14 GMT anno4000@radom.zrz.tu-berlin.de wrote: 
> 
> a> rajendra <rajendra.prasad@in.bosch.com> wrote in comp.lang.perl.misc:
> >> The perl documentation says the fork command generates two copies of the
> >> program ,one parent and one child.
> >> If this is correct,can this  fork command be used for multitasking?.
> 
> a> Yes, that is its very purpose.
> 
> I usually point people to the Stevens books (Advanced Programming in the
> Unix Environment 2nd ed., especially) or some equivalent tutorial,

Just for the record, _Advanced Programming in the Unix Environment_
itself is *not* a tutorial but a hard-core reference.

Anno


------------------------------

Date: Fri, 27 Jul 2007 03:13:28 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Perl with DBI
Message-Id: <m2k5smiajr.fsf@dot-app.org>

Jason <jwcarlton@gmail.com> writes:

> But this leads me to my next question. I want `Test 3` to be a
> variable, but using
>
> $dbh->do("CREATE TABLE param('var') (`date` VARCHAR(14)...
>
> is giving that same generic error as above. I tried it both with and
> without the quotes, and tried using a variable instead ($var =
> param('var');), but still received the same error.
>
> Ideas?

Try reading the "Quote and Quote-like Operators" in "perldoc perlop" to
learn how to interpolate a variable into a string.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


------------------------------

Date: Fri, 27 Jul 2007 09:38:58 +0200
From: Josef Moellers <josef.moellers@fujitsu-siemens.com>
Subject: Re: pid from startet process
Message-Id: <f8c7eo$qeh$1@nntp.fujitsu-siemens.com>

Peter J. Holzer wrote:

> OTOH, a random pid is something the average unix programmer does not
> expect - which may lead to a different class of (possibly
> security-critical) errors.

Sorry, but I have never seen a piece of (*x-) software that relies on=20
some relation between PIDs. It will break as soon as you have a wrap-arou=
nd.

Getting your own PID is a very simple call, getting your child's pid a=20
result of the fork() system call. I don't see how you can put any=20
constraint on one or the other to make it appear non-random!

Josef
--=20
These are my personal views and not those of Fujitsu Siemens Computers!
Josef M=F6llers (Pinguinpfleger bei FSC)
	If failure had no penalty success would not be a prize (T.  Pratchett)
Company Details: http://www.fujitsu-siemens.com/imprint.html



------------------------------

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 689
**************************************


home help back first fref pref prev next nref lref last post