[12869] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 279 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 28 01:07:23 1999

Date: Tue, 27 Jul 1999 22:05:10 -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, 27 Jul 1999     Volume: 9 Number: 279

Today's topics:
    Re: Beginner-friendly group as cultural adaptation? (Tim Morley)
    Re: Beginner-friendly group as cultural adaptation? (Mark W. Schumann)
    Re: beginner-redirect and download (Martien Verbruggen)
    Re: Conversion Question?? (Abigail)
    Re: Conversion Question?? <iberg@montana.edu>
    Re: Date? (Abigail)
    Re: ebcdic packed numbers <uri@sysarch.com>
    Re: Getting Height and Width of GIF/JPEG in PERL? (Abigail)
    Re: Getting Height and Width of GIF/JPEG in PERL? (elephant)
    Re: Help or possibly stupid syntax suggestion re: forea <uri@sysarch.com>
    Re: High demand for Perl programmers? <cmcurtin@interhack.net>
        memory leak (Michael Helm)
    Re: negated compiled regexp (Abigail)
    Re: Orwant book status? (was Re: stopping email) <uri@sysarch.com>
    Re: Pass by value or pass by reference? <c8133594@comp.polyu.edu.hk>
    Re: Pass by value or pass by reference? (Abigail)
    Re: Pass by value or pass by reference? (Abigail)
    Re: Pass by value or pass by reference? <uri@sysarch.com>
        Perl and Internet Information Server 4? (Joe Ramsey)
    Re: print problem (Abigail)
    Re: Selecting files by permisions <uri@sysarch.com>
    Re: Simple form problem (elephant)
    Re: Using perl to ftp non interactively <uri@sysarch.com>
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Wed, 28 Jul 1999 03:05:30 GMT
From: flyfishin@iname.com (Tim Morley)
Subject: Re: Beginner-friendly group as cultural adaptation?
Message-Id: <379e7116.3395553@news.kcnet.com>

On Tue, 27 Jul 1999 03:18:02 GMT, mgjv@comdyn.com.au (Martien
Verbruggen) wrote:

>In article <379cae41$0$214@nntp1.ba.best.com>,

>Don't forget that we only see the ones that don't read before they
>post. We only see the ones that are clueless and rude. The other ones
>don't post, and possibly have already found their answers in the
>documentation, or thanks to the periodical FAQ post. There simply is
>no way for us to reliably know how effective these posts are.

I am a newbie to Perl and find myself perusing the postings
frequently.  I have learned a great deal about programming Perl, just
about Perl, and  where to keep looking for more information. I posted
a reply last fall to a beginner question and was auto emailed
information about the newsgroup and where to find documentation about
Perl.  That should give any newbie a good start and a hint about what
not to post.
As a newbie I believe a "newbie" newsgroup is useless.  If I want good
answers I will come here.  If I have what I feel is an easy or newbie
question I will keep looking in my Learning Perl, Programming Perl,
Perl Cookbook, FAQ's, and docs until I find my answer.  If I am every
going to learn how to write great code the only way to learn is to
write code, not ask others how to write my code.  I don't find
programming as easy as other do but I love the challenge and am
willing to put in the time to be a good programmer.  The only way to
learn, and remember, that you need a semicolon somewhere and not a
comma is to spend an hour figuring it out.

timm



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

Date: 28 Jul 1999 00:22:55 -0400
From: catfood@apk.net (Mark W. Schumann)
Subject: Re: Beginner-friendly group as cultural adaptation?
Message-Id: <7nm0iv$6us@junior.apk.net>

In article <MPG.120776e0e4bb0dac989d50@nntp.hpl.hp.com>,
Larry Rosler <lr@hpl.hp.com> wrote:
>I would characterize c.l.p.moderated as a failure, as its goal relative 
>to c.l.p.misc hasn't been met.  I think c.l.p.newbies or whatever would 
>be the same.  The 'friendly troops' want to be where the action is -- 
>and where the other 'friendly troops' are.

I didn't think the goal of c.l.p.moderated was to clean up c.l.p.misc
or improve it.  I got the impression that the idea was to give the
curmudgeons a relatively noise-free discussion space.  At that it seems
to me to have succeeded very nicely.



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

Date: Wed, 28 Jul 1999 03:52:55 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: beginner-redirect and download
Message-Id: <r8vn3.169$BK.9362@nsw.nnrp.telstra.net>

In article <g1297h2j.fsf@wind.localdomain>,
	llornkcor <llornkcor@llornkcor.com> writes:

> Ditto- I dont think it offtopic here, whats the 'misc' in the
> comp.lang.perl.misc mean??

The misc stands for miscellaneous. In practice that means everything
that is not covered in the more specific newsgroups woth the same
prefix.

The misc did not determine that it was off-topic, but the more
important last part of comp.lang.perl did. If you fail to see that,
maybe you should see how many groupnames on usenet end with .misc.
Would this question have been appropriate on all of them? 

The question was about some browser specific HTPP and/or HTML tricks.
perl is not a browser.

> I think your condescending answers
> (Abigail) are of poor taste, and more off topic than any question here. 

Not at all. Although Abigail's answers are quite rough most of the
time, they are always on topic, and almost always correct. And she's
not rough at all when the questions are actually decent. You do know
that penguins and cucumbers are considered on-topic here, right?

Martien
-- 
Martien Verbruggen                  | My friend has a baby. I'm writing down
Interactive Media Division          | all the noises the baby makes so later
Commercial Dynamics Pty. Ltd.       | I can ask him what he meant - Steven
NSW, Australia                      | Wright


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

Date: 27 Jul 1999 22:40:34 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Conversion Question??
Message-Id: <slrn7psusl.3hu.abigail@alexandra.delanet.com>

Tom Christiansen (tchrist@mox.perl.com) wrote on MMCLVII September
MCMXCIII in <URL:news:379e5bf9@cs.colorado.edu>:
{}      [courtesy cc of this posting mailed to cited author]
{} 
{} In comp.lang.perl.misc, abigail@delanet.com writes:
{} :I agree, the FAQ is incomplete on this subject. 
{} 
{} Patches are always welcome. :-)
{} 
{} But I really thought that I'd managed to get these all explained.
{} Just a second...
{} 
{} Yup, there's bintodec() in perlfunc.  And printf %b goes the other way.


I didn't say perlfunc was incomplete. I said I found the FAQ incomplete.
And yeah, let me think about a patch...



Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Tue, 27 Jul 1999 22:36:22 -0600
From: "Ivan Berg" <iberg@montana.edu>
Subject: Re: Conversion Question??
Message-Id: <7nm1dv$pch$1@news.campuscwix.net>

Thanks for the sarcastic reply :)

Looks like I am probably making simple mistake(read: dumbass) since I am new
to perl.

I don't see how these examples work?  The sub bintodec is not a
function(e.g. it doesn't return a value). Where would you include number who
would want to convert? In other words, example with syntax is needed.

And this peice of code from the faq doesn't seem to work:
$decimal = pack('B8', '10110110');                         -doesn't return
correct decimal
$binary_string = join('', unpack('B*', "\x29"));           -where does
integer go??
I am using a standard 'print $variable' to view the results, is there
something with the print command?? Needs some options??


----- Original Message -----
From: elephant <e-lephant@b-igpond.com>
Newsgroups: comp.lang.perl.misc
Sent: Tuesday, July 27, 1999 6:28 PM
Subject: Re: Conversion Question??


> Ivan Berg writes ..
> >Anybody have an example of going from binary to decimal and vice versa??
> >
> >The FAQ has examples but they don't seem to work at all
>
> you really think they'd be in there if they didn't work at all ? .. they
> just don't work the way you expected
>
> >It seems to all have to do with pack and unpack??
>
> ooh .. wonder why .. what does your manual say pack does ?
>
> admittedly - pack is very powerful and necessarily complex .. but if you
> take the time to get to know it then you'll not look back (WARNING: this
> may require some reading of manuals and experimentation)
>
> >Examples, ideas? Thanks
>
> let's read the FAQ out loud
>
> "
>                                  ...use the pack()
> function (documented in the section on "pack" in the
> perlfunc manpage):
> "
>
> so .. let's check the documentation on pack
>
>   perldoc -f pack
>
> ooh .. look there .. at the bottom
>
>   sub bintodec {
>     unpack("N", pack("B32", substr("0" x 32 . shift, -32)));
>   }
>
> it's as though the authors knew that people would be looking for a way to
> do this .. must be psychic
>
> --
>  jason - remove all hyphens for email reply -





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

Date: 27 Jul 1999 22:46:17 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Date?
Message-Id: <slrn7psv7d.3hu.abigail@alexandra.delanet.com>

Tom Beauchamp (acafounder@crosswinds.net) wrote on MMCLVII September
MCMXCIII in <URL:news:7nlmki$94c@nnrp3.farm.idt.net>:
~~ How can I get the current date into my perl script in numbers.  Like $day,
~~ $month, and $year?  Is there any library that I could use that would let me
~~ to date addition as well?


Well, assuming you grepped on 'year', 'month' and 'day' in the Perl
documentation, it looks like this isn't possible.

Oh dear. Perhaps you should be coding in Visual Basic.




Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 27 Jul 1999 23:14:32 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: ebcdic packed numbers
Message-Id: <x7lnc1tqhz.fsf@home.sysarch.com>

>>>>> "BL" == Bart Lateur <bart.lateur@skynet.be> writes:

  BL> John G Dobnick wrote:
  >> "Packed" numbers (which I presume really means "packed decimal" numbers)
  >> are not EBCDIC, ASCII, or any other character code.  They are
  >> binary coded decimal digits arranged in a specific manner.
  >> 
  >> Each "byte" (8-bit byte in the IBM case) contains two 4-bit binary coded 
  >> decimal digits.

  >> The rightmost "nibble" (a "nibble" is a 4-bit quantity)
  >> contains the sign of the value.  

  BL> Huh?

IBM uses the last nibble to encode the sign of the value. it is how ibm
mainframes (and pl/i) encode it.

  BL> Anyway, in order to decode BCD data, you could first convert this data
  BL> to a hex string, e.g. using sprintf(), and treat the result as a decimal
  BL> number. Basically, that should cut it.

this fails as they are decimal numbers, not hex. you have to grab each
nibble (maybe with some unpack template) and do a *= 10, += digit loop
on it. i did a pl/i any 2 any converter many years ago and know this
stuff too well.

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: 27 Jul 1999 22:44:20 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Getting Height and Width of GIF/JPEG in PERL?
Message-Id: <slrn7psv3n.3hu.abigail@alexandra.delanet.com>

Tom Christiansen (tchrist@mox.perl.com) wrote on MMCLVII September
MCMXCIII in <URL:news:379e57c8@cs.colorado.edu>:
**      [courtesy cc of this posting mailed to cited author]
** 
** Translation courtesy of one of the contest entries submitted for
** http://language.perl.com/misc/geekspeak.html
** 
**     To find out the size of other people's images? I recently wrote a
**     small program that allows our internal network users to transfer
**     eye trash to our websites. Determining the height and width of the
**     transferred image allows the program to write out the proper MS-HTML
**     code to the target HTTP-accessible page.
** 
** Ah, that makes much more sense now. :-)


Hmmm, not really. Where did the 'MS-HTML' come from? If you're referring
to the WIDTH and HEIGHT attributes, they were invented by Netscape, not
MS, and now part of the HTML standard.

Don't forget, when it comes to the web, the evil character is Netscape,
way more than MS.



Abigail
-- 
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Wed, 28 Jul 1999 14:24:38 +1000
From: e-lephant@b-igpond.com (elephant)
Subject: Re: Getting Height and Width of GIF/JPEG in PERL?
Message-Id: <MPG.1209310e6054f252989b96@news-server>

Abigail writes ..
>Banner ads are evil, and HTML browsers can figure out the sizes of
>images very well. ;-)

continuing off topic...

no argument regarding banner ads .. but providing explicit sizes in IMG 
tags is good HTML practice IMHO for two reasons .. (1) it allows browsers 
like MSIE that begin displaying as soon as they can to allow enough room 
for the images as they're rendering which prevents the page jumping 
around as the images are downloaded .. and (2) it allows browsers which 
are set not to display images to present a similar page to one that does 
display the images

followups set

-- 
 jason - remove all hyphens for email reply -


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

Date: 27 Jul 1999 23:58:58 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Help or possibly stupid syntax suggestion re: foreach
Message-Id: <x7aeshtofx.fsf@home.sysarch.com>

>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:

  LR> If you want to avoid copying the original array, then:

  LR>       for (my $i = 0; $i < @list; $i += 2) {
  LR>           my ($a, $b) = @list[$i, $i + 1];
  LR>           ...
  LR>       }

hey, i like that one even though i despise using index variables in
perl.

  LR> I'll let you worry about an array with an odd number of elements.

i have to worry about it too!

either fail it or push undef or '' onto it could work.

  LR> Or, relying on order of evaluation (as I was brought up *not* to):

  LR>       for (my $i = 0; $i < @list; ) {
  LR>           my ($a, $b) = @list[$i++, $i++];
  LR>           ...
  LR>       }

yechhh!!! double side effects which depends on evaluation ordering. and
perl doesn't define evaluation ordering in all places.

  LR> 'Elegance' is in the eye of the beholder.

then you must be blind in your other eye.

:-)

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: 27 Jul 1999 23:09:00 -0400
From: Matt Curtin <cmcurtin@interhack.net>
Subject: Re: High demand for Perl programmers?
Message-Id: <xlx3dy9xygj.fsf@gold.cis.ohio-state.edu>

>>>>> On Tue, 27 Jul 1999 10:26:01 -0700,
    David Cassell <cassell@mail.cor.epa.gov> said:

David> So they may be asking for someone who will charge far more than
David> they are willing to pay.

This is very, very common.

I have a standard blurb that I kick to people who ask for my
consulting expertise, and very often, I hear nothing more once a
dollar figure is mentioned.  That's fine with me; I have more than
enough to do anyway.

-- 
Matt Curtin cmcurtin@interhack.net http://www.interhack.net/people/cmcurtin/


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

Date: 28 Jul 1999 03:17:20 GMT
From: mike@baldur.lbl.gov (Michael Helm)
Subject: memory leak
Message-Id: <7nlso0$6gl3@overload.lbl.gov>

I have a little perl-based server that leaks memory.
Over time, it grows larger & larger, altho it's supposed
to be "stateless" & not carry around retained data & so forth.
Its data should be going out of scope & should be recycled.
(perl is 5.004_04; this version is mandatory.)

Are there any tools available that could help me identify the
unwanted growth factors?


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

Date: 27 Jul 1999 23:02:25 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: negated compiled regexp
Message-Id: <slrn7pt05l.3hu.abigail@alexandra.delanet.com>

lt lindley (ltl@rgsun5.viasystems.com) wrote on MMCLVII September
MCMXCIII in <URL:news:7nlp9c$oqb$1@rguxd.viasystems.com>:
:: 
:: Looks like I have some boundary condition issues here.  I'll try the
:: recommended way again:
:: 
::   DB<3> $rex = qr/^(?:(?!PAT).)*$/
::   DB<4> $val = 'PAT'
::   DB<5> print 'true' if ($val =~ $rex)
:: true

That's strange.

$ perl -wle 'print "true" if "PAT" =~ /^(?:(?!PAT).)*$/'
$ perl -wle '$regex = qr /^(?:(?!PAT).)*$/; print "true" if "PAT" =~ $regex'
$ perl -wle '$regex = qr /^(?:(?!PAT).)*$/; print "true" if "PAT" =~ /$regex/'
$ perl -wle '$regex = qr /^(?:(?!PAT).)*$/; $val = "PAT";
              print "true" if $val =~ /$regex/'
$

Perhaps a bug in the debugger? Nope...

  DB<1> print "true" if "PAT" =~ /^(?:(?!PAT).)*$/

  DB<2>


What version of Perl are you using?




Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 27 Jul 1999 23:16:47 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Orwant book status? (was Re: stopping email)
Message-Id: <x7iu75tqe8.fsf@home.sysarch.com>

>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:

  LR> In article <379dec35.313017@news.skynet.be> on Tue, 27 Jul 1999 17:29:25 
  LR> GMT, Bart Lateur <bart.lateur@skynet.be> says...
  >> I R A Darth Aggie wrote:
  >> >+ It's supposed to be ready before the conference.
  >> >
  >> >Which means the first printing will be sold out at the conference.
  >> 
  >> Just hopw many people are expected at that conference? How many copies
  >> of the book will ORA print? Somehow, I'd expect the latter number to be
  >> bigger than the former.

  LR> The Bighorn Sheep sold out handily last year.

actually they gave that away as the freebie book. extras probably sold
out at their store. but i bet they print up many more and it should be
available in the usual outlets in sept. i hope this is the freebie we
get this year!

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: Wed, 28 Jul 1999 03:04:27 GMT
From: Carfield Yim <c8133594@comp.polyu.edu.hk>
Subject: Re: Pass by value or pass by reference?
Message-Id: <7nlrvp$4u8$1@nnrp1.deja.com>

I get it, in perl it is similar to java, object and array (something
large in memory) is pass by reference, and varible is pass by value?

And it can use something like pointer and de-reference symbol that is
simliar to C.

Is it right?


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: 27 Jul 1999 23:06:00 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Pass by value or pass by reference?
Message-Id: <slrn7pt0cb.3hu.abigail@alexandra.delanet.com>

Carfield Yim (c8133594@comp.polyu.edu.hk) wrote on MMCLVII September
MCMXCIII in <URL:news:7nlo07$2l5$1@nnrp1.deja.com>:
,, Thank for reply!!
,, 
,, I know that perldoc is a great reference, but I don't know how to find
,, the information I want, e.g.: If I want to find information about
,, [return], How do I know perlfunc contain information of it?
,, The only way is asking people at web? I think there should have some
,, document can help me.

But there is. There's 'man perltoc'. Granted, it's not as good as a
full blown index, but you could always use 'grep'.

,, I think that the main problem is I don't know most of the perl index
,, definition.

That's why there are 'man perl' and 'man perltoc'.



Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 27 Jul 1999 23:07:08 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Pass by value or pass by reference?
Message-Id: <slrn7pt0eg.3hu.abigail@alexandra.delanet.com>

Carfield Yim (c8133594@comp.polyu.edu.hk) wrote on MMCLVII September
MCMXCIII in <URL:news:7nlrvp$4u8$1@nnrp1.deja.com>:
&& I get it, in perl it is similar to java, object and array (something
&& large in memory) is pass by reference, and varible is pass by value?
&& 
&& And it can use something like pointer and de-reference symbol that is
&& simliar to C.
&& 
&& Is it right?


Uhm, no. Perl is Perl, and Perl certainly is neither C, nor Java.



Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 28 Jul 1999 00:18:57 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Pass by value or pass by reference?
Message-Id: <x76735tnim.fsf@home.sysarch.com>

>>>>> "CY" == Carfield Yim <c8133594@comp.polyu.edu.hk> writes:

  CY> I get it, in perl it is similar to java, object and array (something
  CY> large in memory) is pass by reference, and varible is pass by value?

no. in fact it is usually the reverse. read perlsub some more to get
it. remember in calling a perl sub, the arguments are passed as one long
list and all arrays and hashes are unraveled thereby making them call by
value. whereas scalar args are aliased in @_ so they are passed by
reference. and most subs assign @_ to my vars which makes it call by
value again.

  CY> And it can use something like pointer and de-reference symbol that is
  CY> simliar to C.

similar in a syntactical but not semantical way.

perl references are not c pointers in any stretch of logic. you can't
create a perl reference out of thin air and you can't segfault using
them. this is a big win over c.

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: Tue, 27 Jul 1999 23:31:35 -0400
From: wjramsey@hotmail.com (Joe Ramsey)
Subject: Perl and Internet Information Server 4?
Message-Id: <MPG.120843a052b6acd3989680@news.cnz.com>

Anyone know of any modules out there or in the works for interfacing to 
the IIS metabase?

I'm trying to write a script that will automatically set up a web site,
some virtual directories, and set permissions on those directories.

Anyone want to field this one???

Thanks

Joe Ramsey
Technical Consultant
Access Systems LLC
wjramsey@hotmail.com

BTW: I'm amazed with Perl!  I haven't programmed since college (10 years) 
but with the aid of the Camel, the PRK and a few other titles (and quite
a few module coders *grin*) been able to write several scripts for 
converting text reports to nice html pages and a automated mailer program 
and customers are using them in production with no problems.  Best of all
I'm having a blast!!!!  Thanks to all of you gurus and aspiring gurus for
all of the support and information  - Joe


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

Date: 27 Jul 1999 23:09:46 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: print problem
Message-Id: <slrn7pt0jd.3hu.abigail@alexandra.delanet.com>

Tom Beauchamp (acafounder@crosswinds.net) wrote on MMCLVII September
MCMXCIII in <URL:news:7nlntk$9if@nnrp3.farm.idt.net>:
{} How can I include quotes in a perl print statement.  Say I want to output
{} this in my script:
{} 
{} <font face="Arial, Helvetica, sans-serif">Whatever</font>
{} 
{} I tried \" and "" but they didn't seem to work.


Doesn't seem to work, doesn't seem to work. That's a broad statement.
I guess that's because the 'print' operator is missing from the above
code fragment.



Abigail
-- 
sub f{sprintf$_[0],$_[1],$_[2]}print f('%c%s',74,f('%c%s',117,f('%c%s',115,f(
'%c%s',116,f('%c%s',32,f('%c%s',97,f('%c%s',0x6e,f('%c%s',111,f('%c%s',116,f(
'%c%s',104,f('%c%s',0x65,f('%c%s',114,f('%c%s',32,f('%c%s',80,f('%c%s',101,f(
'%c%s',114,f('%c%s',0x6c,f('%c%s',32,f('%c%s',0x48,f('%c%s',97,f('%c%s',99,f(
'%c%s',107,f('%c%s',101,f('%c%s',114,f('%c%s',10,)))))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 27 Jul 1999 23:34:16 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Selecting files by permisions
Message-Id: <x7g129tpl3.fsf@home.sysarch.com>

>>>>> "A" == Abigail  <abigail@delanet.com> writes:


  A> This won't work because (stat $file) [2] returns more than the permission
  A> bits - just as the manual say. Do something like:

  A>       unless (((stat $file) [2] & 07644) == 00644) { ... }

  A> Or, if you don't care about suid, gid and sticky bits:

  A>       unless (((stat $file) [2] & 0644) == 0644) { ... }

  A> Personally, I would just do a 'chmod 644 *' in the directory.

for all you abigail hate club members, note the polite and accurate
followup to a posting with a obvious newbie mistake

  A> ||    unless ((stat($file))[2] eq 0644) {

using eq instead of == and her other comments above apply as well.

so she can be nice. you just have to tickle her fancy correctly.

:-)

uri


-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: Wed, 28 Jul 1999 14:15:47 +1000
From: e-lephant@b-igpond.com (elephant)
Subject: Re: Simple form problem
Message-Id: <MPG.12092efa1b5ffdb9989b95@news-server>

Abigail writes ..
>The Barry Family (jwbarry@ibm.net) wrote on MMCLVI September MCMXCIII in
><URL:news:379E14B1.7AEBE13A@ibm.net>:
>'' I copied the code from a tutorial at
>'' http://www.speakeasy.org/~cgires/cgi-tour.html directly to a test file
>
>You should be using -w, use strict, and do use the standard CGI module
>instead of rolling your own, flawed one.

I find it impossible to reconcile these two sentences in your post 
Abigail .. there's no "rolling your own" here .. just a newbie trying to 
struggle through an online tutorial and getting stuck

jeez .. telling them to go read a book / tutorial is helpful .. but 
jumping on them when they happen to pick a bad one is completely useless

-- 
 jason - remove all hyphens for email reply -


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

Date: 27 Jul 1999 23:51:38 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Using perl to ftp non interactively
Message-Id: <x7d7xdtos5.fsf@home.sysarch.com>


do you like reinventing wheels? other than the command line parsing
stuff, it could done far more simply using Net::FTP. and it would handle
all of the protocol not just the subset you wrote.

uri

-- 
Uri Guttman  -----------------  SYStems ARCHitecture and Software Engineering
uri@sysarch.com  ---------------------------  Perl, Internet, UNIX Consulting
Have Perl, Will Travel  -----------------------------  http://www.sysarch.com
The Best Search Engine on the Net -------------  http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.


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

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V9 Issue 279
*************************************


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