[27816] in Perl-Users-Digest
Perl-Users Digest, Issue: 9180 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 20 11:05:41 2006
Date: Thu, 20 Apr 2006 08:05:07 -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 Thu, 20 Apr 2006 Volume: 10 Number: 9180
Today's topics:
Re: How to find uploaded data size from content-length <kkeller-usenet@wombat.san-francisco.ca.us>
Re: show hidden value in variable.. with mysql (Anno Siegel)
Re: show hidden value in variable.. with mysql <1usa@llenroc.ude.invalid>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 20 Apr 2006 07:49:17 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: How to find uploaded data size from content-length
Message-Id: <dkjkh3xvqa.ln2@goaway.wombat.san-francisco.ca.us>
On 2006-04-20, Asterbing <no@thanks.com> wrote:
>
> I've seen and rewritten my own. A matter of courtesy to not 'copy' : in
> my mind, two ways only : I use a module or I just take a look of their
> algorithm (idea), but never copy (steal)
Copying isn't stealing if you're allowed to do it. Just don't
redistribute your program without also distributing the source.
--keith
--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
see X- headers for PGP signature information
------------------------------
Date: 20 Apr 2006 13:23:36 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: show hidden value in variable.. with mysql
Message-Id: <4apgaoFtsecsU1@news.dfncis.de>
A. Sinan Unur <1usa@llenroc.ude.invalid> wrote in comp.lang.perl.misc:
> anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote in
> news:4aovsqFtteb8U3@news.dfncis.de:
>
> > A. Sinan Unur <1usa@llenroc.ude.invalid> wrote in comp.lang.perl.misc:
> >> joe.henderson1@ wrote in news:gfcd429kaaot9ibb06l6ma1od1j5tf1q17@
> >> 4ax.com:
> >
> > [...]
> >
> >> > my $item = $_[0];
> >>
> >> my ($item) = @_;
> >>
> >> would enable you to pass literal strings to this routine as well as
> >> variables.
> >
> > What difference would it make?
>
> Admittedly, not much in the OP's case.
>
> D:\Home\asu1\UseNet\clpmisc> cat test1.pl
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> print s2t1('nos much'), "\n";
> print s2t2('nos much'), "\n";
>
> sub s2t1 {
> my (@args) = @_;
>
> s/s/t/ for @args;
> return @args;
> }
>
> sub s2t2 {
> s/s/t/ for @_;
> return @_;
> }
>
>
> D:\Home\asu1\UseNet\clpmisc> test1
> not much
> Modification of a read-only value attempted at D:\Home\asu1\UseNet
> \clpmisc\test1.pl line 17.
Yes, of course, but that isn't what the OP tried to do.
sub foo {
my $item = $_[ 0]; # this is what the OP did
# ...
}
and
sub foo {
my ( $item) = @_; # this is what you suggested instead
# ...
}
are exactly equivalent. In s2t2() you are using the elements of @_
directly. That *is* different.
Anno
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
------------------------------
Date: Thu, 20 Apr 2006 14:08:08 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: show hidden value in variable.. with mysql
Message-Id: <Xns97AB671BDB24Casu1cornelledu@127.0.0.1>
anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote in
news:4apgaoFtsecsU1@news.dfncis.de:
> A. Sinan Unur <1usa@llenroc.ude.invalid> wrote in comp.lang.perl.misc:
>> anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote in
>> news:4aovsqFtteb8U3@news.dfncis.de:
>>
>> > A. Sinan Unur <1usa@llenroc.ude.invalid> wrote in
comp.lang.perl.misc:
>> >> joe.henderson1@ wrote in news:gfcd429kaaot9ibb06l6ma1od1j5tf1q17@
>> >> 4ax.com:
>> >
>> > [...]
>> >
>> >> > my $item = $_[0];
>> >>
>> >> my ($item) = @_;
>> >>
>> >> would enable you to pass literal strings to this routine as well
>> >> as variables.
>> >
>> > What difference would it make?
>>
...
>> sub s2t2 {
>> s/s/t/ for @_;
>> return @_;
>> }
>>
>>
>> D:\Home\asu1\UseNet\clpmisc> test1
>> not much
>> Modification of a read-only value attempted at D:\Home\asu1\UseNet
>> \clpmisc\test1.pl line 17.
>
> Yes, of course, but that isn't what the OP tried to do.
>
> sub foo {
> my $item = $_[ 0]; # this is what the OP did
> # ...
> }
>
> and
>
> sub foo {
> my ( $item) = @_; # this is what you suggested instead
> # ...
> }
>
> are exactly equivalent. In s2t2() you are using the elements of @_
> directly. That *is* different.
OOOOOOPS! No excuse this time. Thanks for catching that.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.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 V10 Issue 9180
***************************************