[13671] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1081 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 15 16:12:45 1999

Date: Fri, 15 Oct 1999 13:12:34 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <940018354-v9-i1081@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 15 Oct 1999     Volume: 9 Number: 1081

Today's topics:
        tr// question <dan.berman@ubl.com>
    Re: tr// question (Gordon)
    Re: tr// question <koharik@primenet.com>
    Re: tr// question <makkulka@cisco.com>
    Re: tr// question <laurensmith@sprynet.com>
    Re: tr// question <uri@sysarch.com>
    Re: tr// question (Abigail)
    Re: tr// question <pooka@cygnus.ucdavis.edu>
    Re: tr// question <uri@sysarch.com>
    Re: tr// question <pooka@cygnus.ucdavis.edu>
    Re: tr// question (Abigail)
    Re: tr// question (Tad McClellan)
    Re: tr// question <pooka@cygnus.ucdavis.edu>
    Re: tr// question <uri@sysarch.com>
    Re: tr// question <pooka@cygnus.ucdavis.edu>
    Re: tr// question (Martien Verbruggen)
    Re: tr// question <nick.condon@tamesis.com>
    Re: tr// question (Sam Holden)
    Re: tr// question (Greg Bacon)
    Re: tr// question (Tad McClellan)
    Re: Typeglob bug? (M.J.T. Guy)
    Re: Typeglob bug? (Villy Kruse)
    Re: UNC path problem with Perl on Win32 <lee@insync.net>
    Re: UNC path problem with Perl on Win32 (Steven M. O'Neill)
    Re: UNIX (Solaris 2.6) to NT ACCESS DB? (Kragen Sitaker)
        UNIX to NT <samay1NOsaSPAM@hotmail.com.invalid>
    Re: UNIX to NT <laurensmith@sprynet.com>
        urgent: calling perl in java <awong@infhkg.informix.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 14 Oct 1999 15:34:16 -0700
From: "Dan Berman" <dan.berman@ubl.com>
Subject: tr// question
Message-Id: <7u5m2j$m74$1@hops.adnc.com>

i want to replace every instance of ".gif" with "_t.gif"
im not sure where i need to put backslashes or anything to get the syntax
right. i tried
$thumb =~ tr/\.gif/_t\.gif/; but that changed "image.gif" to ".mate_t.g" all
help appreciated. thanks




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

Date: 14 Oct 1999 22:58:26 GMT
From: nospam@today.com (Gordon)
Subject: Re: tr// question
Message-Id: <36447.66372259C1Bjustooltries@4.22.39.85>

dan.berman@ubl.com (Dan Berman) wrote in <7u5m2j$m74$1@hops.adnc.com>:

>i want to replace every instance of ".gif" with "_t.gif"
>im not sure where i need to put backslashes or anything to get the syntax
>right. i tried
>$thumb =~ tr/\.gif/_t\.gif/; but that changed "image.gif" to ".mate_t.g" all
>help appreciated. thanks
>

try using s/// rather than tr///

$thumb =~ s/\.gif/_t\.gif/ig;

-- Gordon --


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

Date: Thu, 14 Oct 1999 16:06:14 -0700
From: Chris Koharik <koharik@primenet.com>
Subject: Re: tr// question
Message-Id: <Pine.BSI.3.96.991014160501.5847A-100000@usr02.primenet.com>

> Date: 14 Oct 1999 22:58:26 GMT
> From: Gordon <nospam@today.com>
> 
> dan.berman@ubl.com (Dan Berman) wrote in <7u5m2j$m74$1@hops.adnc.com>:
> 
> >i want to replace every instance of ".gif" with "_t.gif"
> >im not sure where i need to put backslashes or anything to get the syntax
> >right. i tried
> >$thumb =~ tr/\.gif/_t\.gif/; but that changed "image.gif" to ".mate_t.g" all
> >help appreciated. thanks
> >
> 
> try using s/// rather than tr///
> 
> $thumb =~ s/\.gif/_t\.gif/ig;

Might want to qualify that.  Assuming that the original poster wanted only
the extension changed you might do this:

$var =~ s/\.gif$/_t\.gif/i;

-Chris



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

Date: Thu, 14 Oct 1999 15:57:48 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: tr// question
Message-Id: <38065FEC.598A9BFF@cisco.com>

{Dan Berman wrote:

>  i tried $thumb =~ tr/\.gif/_t\.gif/; but that changed "image.gif" to
> ".mate_t.g" all

It did exactly what it is supposed to do !
Replace
 . with  _
g with t
i with .
f with g
etc.

use s/// ;



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

Date: Thu, 14 Oct 1999 16:07:19 -0700
From: "Lauren Smith" <laurensmith@sprynet.com>
Subject: Re: tr// question
Message-Id: <7u5nnh$tjp$1@brokaw.wa.com>


Dan Berman wrote in message <7u5m2j$m74$1@hops.adnc.com>...
>i want to replace every instance of ".gif" with "_t.gif"
>$thumb =~ tr/\.gif/_t\.gif/; but that changed "image.gif" to
".mate_t.g"
Yep, that's about right.  (hint - 'tr'anslate, not 's'ubstitute)

try 's/\.gif/_t\.gif/;'

For more info on why 'tr' is not what you're looking for, see perlop.

Lauren




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

Date: 14 Oct 1999 19:30:46 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: tr// question
Message-Id: <x7zoxlikpl.fsf@home.sysarch.com>

>>>>> "CK" == Chris Koharik <koharik@primenet.com> writes:

  >> dan.berman@ubl.com (Dan Berman) wrote in <7u5m2j$m74$1@hops.adnc.com>:
  >> 
  >> try using s/// rather than tr///
  >> 
  >> $thumb =~ s/\.gif/_t\.gif/ig;
                         ^
  CK> $var =~ s/\.gif$/_t\.gif/i;
                         ^
in both cases, that is not needed as the replacement string is not a
regex.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: 14 Oct 1999 20:27:41 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: tr// question
Message-Id: <slrn80d0nt.q8s.abigail@alexandra.delanet.com>

Dan Berman (dan.berman@ubl.com) wrote on MMCCXXXV September MCMXCIII in
<URL:news:7u5m2j$m74$1@hops.adnc.com>:
^^ i want to replace every instance of ".gif" with "_t.gif"
^^ im not sure where i need to put backslashes or anything to get the syntax
^^ right. i tried
^^ $thumb =~ tr/\.gif/_t\.gif/; but that changed "image.gif" to ".mate_t.g" all
^^ help appreciated. thanks


Well, what part of the man pages about tr didn't you understand?



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


  -----------== 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: Fri, 15 Oct 1999 04:55:01 GMT
From: Brandon <pooka@cygnus.ucdavis.edu>
Subject: Re: tr// question
Message-Id: <380642E8.4E6A45A3@cygnus.ucdavis.edu>

Abigail wrote:
> 
 help appreciated. thanks
> 
> Well, what part of the man pages about tr didn't you understand?
> 
> Abigail

What an extremely useful response. Good job!


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

Date: 15 Oct 1999 01:04:04 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: tr// question
Message-Id: <x7r9ixi5a3.fsf@home.sysarch.com>

>>>>> "B" == Brandon  <pooka@cygnus.ucdavis.edu> writes:

  B> Abigail wrote:
  >> 
  B>  help appreciated. thanks
  >> 
  >> Well, what part of the man pages about tr didn't you understand?
  >> 
  >> Abigail

  B> What an extremely useful response. Good job!

what an extremely useless followup. bad job!

the original poster obviously didn't unsderstand the docs as he tried to
do a substitute with tr///. abigail was asking how he confused those two
ops. so it WAS an extremely useful response. so you actually did get
it. and so your followup is actually not useless as it was a nice
compliment on abigail's followup.

this is such a warm and friendly cabal!

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Fri, 15 Oct 1999 05:45:09 GMT
From: Brandon <pooka@cygnus.ucdavis.edu>
Subject: Re: tr// question
Message-Id: <38064EA9.9A4F75E3@cygnus.ucdavis.edu>

> Uri Guttman wrote:
> >   >>
> >   >> Well, what part of the man pages about tr didn't you understand?
> >   >>
> >   >> Abigail
> >
> >   B> What an extremely useful response. Good job!
> >
> > what an extremely useless followup. bad job!
> >
> > the original poster obviously didn't unsderstand the docs as he tried to
> > do a substitute with tr///. abigail was asking how he confused those two
> > ops. so it WAS an extremely useful response. so you actually did get
> > it. and so your followup is actually not useless as it was a nice
> > compliment on abigail's followup.
> 

Abigail was blatantly deriding the original poster. The original poster
was asking for a solution, not the source of his/her problem. Simply
implying that you didn't understand the man page is _not_ any sort of
useful solution to the problem. So I think my sarcasm was well founded.


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

Date: 15 Oct 1999 01:01:24 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: tr// question
Message-Id: <slrn80dgp3.q8s.abigail@alexandra.delanet.com>

Brandon (pooka@cygnus.ucdavis.edu) wrote on MMCCXXXVI September MCMXCIII
in <URL:news:38064EA9.9A4F75E3@cygnus.ucdavis.edu>:
`` 
`` Abigail was blatantly deriding the original poster. The original poster
`` was asking for a solution, not the source of his/her problem. Simply
`` implying that you didn't understand the man page is _not_ any sort of
`` useful solution to the problem. So I think my sarcasm was well founded.


You can't fix problems if you don't know the source of them.



Abigail
-- 
$_ = "\x3C\x3C\x45\x4F\x54";
print if s/<<EOT/<<EOT/e;
Just another Perl Hacker
EOT


  -----------== 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: Thu, 14 Oct 1999 19:44:59 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: tr// question
Message-Id: <rtp5u7.e54.ln@magna.metronet.com>

Dan Berman (dan.berman@ubl.com) wrote:
: i want to replace every instance of ".gif" with "_t.gif"
: im not sure where i need to put backslashes or anything to get the syntax
: right. i tried
: $thumb =~ tr/\.gif/_t\.gif/; but that changed "image.gif" to ".mate_t.g" all
: help appreciated. thanks


   If tr/// is not doing what you expect, then you should go
   read what tr/// is supposed to do.

   tr/// is documented in perlop.pod


   After you do that, you should realize that tr/// is not
   the tool for the job you are trying to do, because it
   replaces *characters*, while you want to replace *strings*.

   s/// can replace strings.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Fri, 15 Oct 1999 06:11:38 GMT
From: Brandon <pooka@cygnus.ucdavis.edu>
Subject: Re: tr// question
Message-Id: <380654DA.66296EA4@cygnus.ucdavis.edu>

Abigail wrote:
> 
> Brandon (pooka@cygnus.ucdavis.edu) wrote on MMCCXXXVI September MCMXCIII
> in <URL:news:38064EA9.9A4F75E3@cygnus.ucdavis.edu>:
> ``
> `` Abigail was blatantly deriding the original poster. The original poster
> `` was asking for a solution, not the source of his/her problem. Simply
> `` implying that you didn't understand the man page is _not_ any sort of
> `` useful solution to the problem. So I think my sarcasm was well founded.
> 
> You can't fix problems if you don't know the source of them.
> 
> Abigail

Interesting how almost _every_ other post in this thread mentions
something useful: that he should use the substitution operator instead
of translation... It's a good thing you're not a teacher. "Teacher, I
can't get my chemisty experiment to work properly." "Go read the
textbook again. I'm too busy coming up with clever signature lines."


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

Date: 15 Oct 1999 02:16:48 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: tr// question
Message-Id: <x7g0zdi1wv.fsf@home.sysarch.com>

>>>>> "B" == Brandon  <pooka@cygnus.ucdavis.edu> writes:

  >> Uri Guttman wrote:
  >> >   >>
  >> >   >> Well, what part of the man pages about tr didn't you understand?
  >> >   >>
  >> >   >> Abigail
  >> >
  >> >   B> What an extremely useful response. Good job!
  >> >
  >> > what an extremely useless followup. bad job!
  >> >
  >> > the original poster obviously didn't unsderstand the docs as he tried to
  >> > do a substitute with tr///. abigail was asking how he confused those two
  >> > ops. so it WAS an extremely useful response. so you actually did get
  >> > it. and so your followup is actually not useless as it was a nice
  >> > compliment on abigail's followup.
  >> 

  B> Abigail was blatantly deriding the original poster. The original poster
  B> was asking for a solution, not the source of his/her problem. Simply
  B> implying that you didn't understand the man page is _not_ any sort of
  B> useful solution to the problem. So I think my sarcasm was well founded.


how do you know that? do you know abigail? can you detect sarcasm or
sincerity in her keystrokes? her phrasing was perfectly accurate. the
poster didn't understand tr/// and she was asking him what he didn't
understand. sounds sincere to me. i think you must have a grudge against
our dear abby for you to assume sarcasm.

and DO NOT STEALTH EMAIL ME AGAIN.

<caps for are unusual for me, but well needed here>

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Fri, 15 Oct 1999 06:40:35 GMT
From: Brandon <pooka@cygnus.ucdavis.edu>
Subject: Re: tr// question
Message-Id: <38065BA5.F4DBEC69@cygnus.ucdavis.edu>

Uri Guttman wrote:
> 
>   B> useful solution to the problem. So I think my sarcasm was well founded.
> 
> how do you know that? do you know abigail? can you detect sarcasm or
> sincerity in her keystrokes? her phrasing was perfectly accurate. the
> poster didn't understand tr/// and she was asking him what he didn't
> understand. sounds sincere to me. i think you must have a grudge against
> our dear abby for you to assume sarcasm.
> 
> and DO NOT STEALTH EMAIL ME AGAIN.
> 

You're pretty accusatory for someone who just gave a lecture on "how do
you know this" and "how do you know that". My only grudge is against 
derisive answers to perfectly reasonable questions.


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

Date: Fri, 15 Oct 1999 06:44:56 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: tr// question
Message-Id: <I3AN3.431$Kd.6712@nsw.nnrp.telstra.net>

On Fri, 15 Oct 1999 06:40:35 GMT,
	Brandon <pooka@cygnus.ucdavis.edu> wrote:
> Uri Guttman wrote:
> > 
> >   B> useful solution to the problem. So I think my sarcasm was well founded.
> > 
> > how do you know that? do you know abigail? can you detect sarcasm or
> > sincerity in her keystrokes? her phrasing was perfectly accurate. the
> > poster didn't understand tr/// and she was asking him what he didn't
> > understand. sounds sincere to me. i think you must have a grudge against
> > our dear abby for you to assume sarcasm.
> > 
> > and DO NOT STEALTH EMAIL ME AGAIN.
> > 
> 
> You're pretty accusatory for someone who just gave a lecture on "how do
> you know this" and "how do you know that". My only grudge is against 
> derisive answers to perfectly reasonable questions.

Just let it go. We've had more than enough of this sort of discussion
on this group lately.

*plonk thread*

*neg score for trolling*

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | The world is complex; sendmail.cf reflects
Commercial Dynamics Pty. Ltd.   | this.
NSW, Australia                  | 


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

Date: Fri, 15 Oct 1999 13:17:38 +0100
From: Nick Condon <nick.condon@tamesis.com>
Subject: Re: tr// question
Message-Id: <38071B62.928A355@tamesis.com>

Abigail wrote:

> Dan Berman (dan.berman@ubl.com) wrote on MMCCXXXV September MCMXCIII in
> <URL:news:7u5m2j$m74$1@hops.adnc.com>:
> ^^ i want to replace every instance of ".gif" with "_t.gif"
> ^^ im not sure where i need to put backslashes or anything to get the syntax
> ^^ right. i tried
> ^^ $thumb =~ tr/\.gif/_t\.gif/; but that changed "image.gif" to ".mate_t.g" all
> ^^ help appreciated. thanks
>
> Well, what part of the man pages about tr didn't you understand?

Obviously, *obviously*, there is some part of the man page that he doesn't
understand. That is why he is posting the question to this group. That is why the
group exists.

Your big contribution to this group is to abuse others for posting ("Read the man
pages", "That's not Perl question", "Read the FAQ", "Read all the FAQ".). Scratch
that, it's not a big contribution, everybody wants to do it. I read this group a lot
less often than I would like to because it really makes me angry how many
supercilious, smug bastards it has.

I certainly wouldn't dare post a question.
--
Nick Condon




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

Date: 15 Oct 1999 13:24:19 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: tr// question
Message-Id: <slrn80eao3.d4j.sholden@pgrad.cs.usyd.edu.au>

On Fri, 15 Oct 1999 13:17:38 +0100, Nick Condon <nick.condon@tamesis.com> wrote:
<snip... oops snipped too much... a reply to an Abigail answer>
>Your big contribution to this group is to abuse others for posting ("Read the man
>pages", "That's not Perl question", "Read the FAQ", "Read all the FAQ".). Scratch
>that, it's not a big contribution, everybody wants to do it. I read this group a lot
>less often than I would like to because it really makes me angry how many
>supercilious, smug bastards it has.
>
>I certainly wouldn't dare post a question.

That's lucky since a large number of people won't be reading your posts anyway.

Mmmm... that .sig of mine that got selected is a little long... oh well, at
least it means I posted more than one line.

-- 
Sam

Many modern computer languages aspire to be minimalistic. They either
succeed in being minimalistic, in which case they're relatively useless,
or they don't succeed in being truly minimalistic, in which case you can
actually solve real problems with them.  --Larry Wall


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

Date: 15 Oct 1999 14:26:37 GMT
From: gbacon@ruby.itsc.uah.edu (Greg Bacon)
Subject: Re: tr// question
Message-Id: <7u7dit$br1$2@info2.uah.edu>

In article <38065BA5.F4DBEC69@cygnus.ucdavis.edu>,
	Brandon <pooka@cygnus.ucdavis.edu> writes:

: You're pretty accusatory for someone who just gave a lecture on "how do
: you know this" and "how do you know that". My only grudge is against 
: derisive answers to perfectly reasonable questions.

This newsgroup is not a helpdesk.  People who already know Perl won't be
interested elementary answers to elementary Perl problems.  If we
followed your approach, we would ruin comp.lang.perl.misc.

Greg
-- 
If you're right 90% of the time, why quibble about the remaining 3%?


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

Date: Fri, 15 Oct 1999 08:18:32 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: tr// question
Message-Id: <o267u7.cp5.ln@magna.metronet.com>

[ Please limit you line lengths to the conventional 70-72 characters.

  Else they get hard to read after being quoted a few times.
]


Nick Condon (nick.condon@tamesis.com) wrote:
: Abigail wrote:

: > Dan Berman (dan.berman@ubl.com) wrote on MMCCXXXV September MCMXCIII in
: > <URL:news:7u5m2j$m74$1@hops.adnc.com>:
: > ^^ i want to replace every instance of ".gif" with "_t.gif"
: > ^^ im not sure where i need to put backslashes or anything to get the syntax
: > ^^ right. i tried
: > ^^ $thumb =~ tr/\.gif/_t\.gif/; but that changed "image.gif" to ".mate_t.g" all
: > ^^ help appreciated. thanks
: >
: > Well, what part of the man pages about tr didn't you understand?

: Obviously, *obviously*, 


   It is not obvious at all that he has even _seen_ the man page.

   What makes you so sure that he looked at it already?

   I don't see anything to suggest that, but I must be missing
   something obvious.

   Please point it out for us less astute people.


: there is some part of the man page that he doesn't
           ^^^^^^^^^
: understand. 


   Yes.

   And abigail is wondering which part that is.

   Not much point in spending time explaining the the whole darn
   thing when the problem is with some part of it.


: That is why he is posting the question to this group. 


   I think he is posting to the newsgroup because he did not
   read *any* of the man page.

   There are dozens of such posts here every day.


: That is why the
: group exists.


   No it isn't.

   This is not a help desk.

   (a help desk will read the manual to you, you are expected to
    do that yourself on Usenet.
   )


: Your big contribution 


   Abigail's contribution to this newsgroup pales in comparison
   you your own prodigious contribution, to be sure.


: to this group is to abuse others for posting 


   No it isn't.

   The abuse is not for posting.

   Doesn't make much sense to have a newsgroup where you aren't
   supposed to post!

   The abuse is for attempting to push _their_ work (reading
   about the operator that they are using) off onto others.

   Nastiness is a natural reaction to such selfishness.

   Posters should either not be so selfish, or should take
   what they get for attempting to get by with socially
   unacceptable behavior.


: ("Read the man
: pages", 


   Do your own work.


: "That's not Perl question", 


   Why bother with having tens of thousands of newsgroups about
   particular topics if the posts are not about particular topics.

   In that case, we should just have one newsgroup where *all*
   of the posts go.

   ( I hope you can see that that is ridiculous )


: "Read the FAQ", 


   Do your own work.



: Scratch
: that, it's not a big contribution, everybody wants to do it. I read this group a lot
: less often than I would like to because it really makes me angry how many
: supercilious, smug bastards it has.


   I read this grou a lot less often than I would like to because it
   really makes me angry how many selfish bastards it has who want
   other people to do their work for them.


: I certainly wouldn't dare post a question.


   If it is not easily found and answered by the standard docs
   that come with perl, then post away.

   The post that started this thread was not such a post.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 13 Oct 1999 05:54:17 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Typeglob bug?
Message-Id: <7u16q9$r3u$1@pegasus.csx.cam.ac.uk>

Shubro Mandal  <shubro@topservice.com> wrote:
>
>Trouble:
>========
>#!/usr/bin/perl
>$O = "dollar_O\n";
>@O = ("OO", "bb", "\n");
>*a = *O;
>print "@O";
>print "@a";
>
>
>This program does not compile. This is the error message.
>---
>cruise<smandal>275: perl a.pl
>In string, @a now must be written as \@a at pll line 6, near "@a"
>Execution of pll aborted due to compilation errors.
>cruise<smandal>276:
>---

You need to put at the front of the program

use vars '@a';


Mike Guy


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

Date: 13 Oct 1999 10:37:54 +0200
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: Typeglob bug?
Message-Id: <7u1gd2$k0p$1@pharmnl.ohout.pharmapartners.nl>

In article <x74sfwl5bo.fsf@home.sysarch.com>,
Uri Guttman  <uri@sysarch.com> wrote:


>interesting but not that difficult to explain. perl5 changed the
>behavior of array vars being interpolated in strings. if the array has
>never been seen before by the compiler, it will assume that the
>interpolated array is bogus and the @ should be escaped.



What it means that the compiler half-guessed that you intended to print
litteral '@a' and not the values of the array @a.  I needed to understand
that when I saw the error message the first time.



Villy


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

Date: Tue, 12 Oct 1999 16:34:14 -0500
From: "Lee Sharp" <lee@insync.net>
Subject: Re: UNC path problem with Perl on Win32
Message-Id: <oPNM3.8087$Ph7.40840@insync>

Dorr Lewright wrote in message <38034A87.95209C14@nuworld.com>...

|When calling pkzip.exe, or a Windows NT 4.0 batch file I am getting the
|following error message:

|\\SERVER02\ftpdata\FtpIn\ESS\Input' is an invalid current directory
|path.  UNC paths are not supported.
|Defaulting to Windows directory.

|What can I do to remedy this problem?

|I am running perl release "5.005_03 built for MSWin32-x86-object".

   This is not a perl problem, but a service problem.  The service launching
your script is probably running as the "service" account.  That has full
local access, and no network access.  The solution is to change the service
launching the script to something with networking permissions.

            Lee

--
SCSI is *NOT* magic. There are *fundamental technical reasons* why it is
necessary to sacrifice a young goat to your SCSI chain now and then. * Black
holes are where God divided by zero. - I am speaking as an individual, not
as a representative of any company, organization or other entity.  I am
solely responsible for my words.






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

Date: 12 Oct 1999 19:34:38 -0400
From: steveo@panix.com (Steven M. O'Neill)
Subject: Re: UNC path problem with Perl on Win32
Message-Id: <7u0gie$nop$1@panix6.panix.com>

In article <38034A87.95209C14@nuworld.com>,
Dorr Lewright  <dlewright@nuworld.com> wrote:
>When calling pkzip.exe, or a Windows NT 4.0 batch file I am getting the
>following error message:
>
>\\SERVER02\ftpdata\FtpIn\ESS\Input' is an invalid current directory
>path.  UNC paths are not supported.
>Defaulting to Windows directory.
>
>What can I do to remedy this problem?

Unmap a drive (with `net use /d...`).
Map a drive to \\SERVER02\ftpdta.
Call your executable with a drive letter and relative path.
Unmap the drive.
-- 
Steven O'Neill                                         steveo@panix.com


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

Date: Wed, 13 Oct 1999 14:43:53 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: UNIX (Solaris 2.6) to NT ACCESS DB?
Message-Id: <JU0N3.12856$UG5.768444@typ11.nn.bcandid.com>

In article <Q1nK3.1160$H32.69840@newshog.newsread.com>,
Scott McMahan <scott@aravis.softbase.com> wrote:
>Kragen Sitaker (kragen@dnaco.net) wrote:
>> Anyway, it *could* change, but when and if it does, it means that
>> *every application* that uses COM for storage will suddenly no longer
>> be able to read its old files.
>
>That's not right -- the application would be oblivious to the change.
>A COM storage could be stored anywhere, and the application doesn't
>care because it uses the COM API. A storage could be in a BLOB field in
>a database as easily as a file, as long as the application was able to
>name it properly.

Right.  However, if the format of the underlying data changed in a
non-backward-compatible fashion -- such that programs using different
versions of the COM API were reading and writing differently-formatted
files -- then the old files would become unreadable by the new programs.

(Of course, we can hope Microsoft would include in the new COM stream
code some backward compatibility.)

>The whole point of the storage abstraction is the implementation
>of "files" can change out from under the application without it
>even noticing. The idea is to allow for distributed files and
>so forth, ie a filesystem with files on other computers.

As you point out below, file sharing allows this too.  So would mapping
database tables into the filesystem.

>> BTW, the NTFS-as-COM-storage idea sort of parallels Linux's reiserfs.
>
>An object-oriented file system in a database was also tried by Oracle, if
>I remember right, who wanted to replace the entire OS with a "bare metal"
>computer running just Oracle. None of these have taken off, probably
>because the speed is not there yet.

I think, in Oracle's case, the code isn't there yet.  Reiserfs might
have the same excuse.

>Either that or the "low tech" file
>sharing is good enough, and not worth the migration. Beats me.

The real advantages of storing things in modern relational databases
are more than just network-transparency.  You also get transactions,
queries, and integrity constraints.  (Ever wished your filesystem had
integirty constraints? :)

-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Oct 12 1999
28 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Wed, 13 Oct 1999 15:36:00 -0700
From: Samay <samay1NOsaSPAM@hotmail.com.invalid>
Subject: UNIX to NT
Message-Id: <000b8d9b.8bfc8a26@usw-ex0102-016.remarq.com>

Hi, I have written few perl programs on UNIX.
They are working fine. They usually process the data from one directory
and puts it into another directory.
I haven't used any module except Time::Local which is on NT.
Now which things I should be careful while running it on NT.
How should I modify the program.?? There are no command line switches.
It uses #!/usr/bin/perl, I have installed ActivePerl on NT.

Regars,
Samay



* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: Wed, 13 Oct 1999 15:56:40 -0700
From: "Lauren Smith" <laurensmith@sprynet.com>
Subject: Re: UNIX to NT
Message-Id: <7u32nf$8kv$1@brokaw.wa.com>


Samay wrote in message <000b8d9b.8bfc8a26@usw-ex0102-016.remarq.com>...
>Now which things I should be careful while running it on NT.
>How should I modify the program.?? There are no command line switches.
>It uses #!/usr/bin/perl, I have installed ActivePerl on NT.

Have a look at the ActivePerl documentation.  If you hit
Start->Programs->ActivePerl->Documentation, you will get an HTML page
with links to all of ActivePerl's documenatation.  Check out the Active
Perl FAQ, it'll have good info on the differences between Windows and
Unix Perls.

Lauren




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

Date: Thu, 14 Oct 1999 10:20:59 +0800
From: awong <awong@infhkg.informix.com>
Subject: urgent: calling perl in java
Message-Id: <38053E0B.7D30419E@infhkg.informix.com>

Hello all,
    I'd like to ask how to run perl script in java code ?
Thanks.
Andrew



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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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


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